[LU-5476] Buffer overflow in ll_fid2path Created: 12/Aug/14 Updated: 15/Aug/14 Resolved: 15/Aug/14 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.5.0, Lustre 2.6.0, Lustre 2.4.2, Lustre 2.7.0 |
| Fix Version/s: | Lustre 2.7.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Oleg Drokin | Assignee: | WC Triage |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 15272 |
| Description |
|
Reported by Dan Carpenter against upstream client: The patch d7e09d0397e8: "staging: add Lustre file system client drivers/staging/lustre/lustre/llite/file.c:1730 ll_fid2path() drivers/staging/lustre/lustre/llite/file.c 1723 outsize is an int. 1725 OBD_ALLOC(gfout, outsize); 1730 memcpy(gfout, gfin, sizeof(*gfout)); It would lead to memory corruption here. Probably we should add if (gfin->gf_pathlen > PATH_MAX) Is that the right limit here? 1731 OBD_FREE_PTR(gfin); |
| Comments |
| Comment by Oleg Drokin [ 12/Aug/14 ] |
|
Patch in http://review.whamcloud.com/11412 |
| Comment by Patrick Farrell (Inactive) [ 13/Aug/14 ] |
|
Since you're looking at fid2path problems, could you possibly take a look at |
| Comment by Jodi Levi (Inactive) [ 15/Aug/14 ] |
|
Patch landed to Master. |