[LU-8774] copy_from_user() should not use MAX_STRING_SIZE Created: 28/Oct/16 Updated: 11/May/17 Resolved: 22/Nov/16 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.9.0 |
| Fix Version/s: | Lustre 2.9.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Jian Yu | Assignee: | Jian Yu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
The following codes are incorrect: $ git grep "MAX_STRING_SIZE" | grep copy_from_user lustre/ldlm/ldlm_resource.c: if (copy_from_user(dummy, buffer, MAX_STRING_SIZE)) lustre/obdclass/lprocfs_status.c: if (copy_from_user(dummy, buffer, MAX_STRING_SIZE)) We should only copy enough bytes to cover count passed in. |
| Comments |
| Comment by Gerrit Updater [ 28/Oct/16 ] |
|
Jian Yu (jian.yu@intel.com) uploaded a new patch: http://review.whamcloud.com/23462 |
| Comment by Gerrit Updater [ 19/Nov/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/23462/ |
| Comment by Jian Yu [ 22/Nov/16 ] |
|
Patch landed to master branch for Lustre 2.9.0. |