[LU-9835] Potential buffer overrun in jt_opt_threads() Created: 04/Aug/17 Updated: 27/Jul/19 Resolved: 27/Jul/19 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.13.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Oleg Drokin | Assignee: | Oleg Drokin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
smatch highlighted: if (verbose != 0) { snprintf(cmdstr, sizeof(cmdstr), "%s", argv[4]); for (i = 5; i < argc; i++) snprintf(cmdstr + strlen(cmdstr), sizeof(cmdstr), " %s", argv[i]); printf("%s: starting %ld threads on device %s running %s\n", argv[0], threads, argv[3], cmdstr); } Note how the other sprints inside of the for loop advances the cmdstr pointer, but dos not adjust the size of the string. |
| Comments |
| Comment by Gerrit Updater [ 04/Aug/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/28363 |
| Comment by Gerrit Updater [ 27/Jul/19 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/28363/ |
| Comment by Peter Jones [ 27/Jul/19 ] |
|
Landed for 2.13 |