[LU-3284] some stripe ioctl() handling issues and questions Created: 06/May/13 Updated: 23/Jun/21 Resolved: 23/Jun/21 |
|
| Status: | Closed |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.4.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | John Hammond | Assignee: | John Hammond |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | lov | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 8123 | ||||||||
| Description |
|
In ll_dir_ioctl() LL_IOC_LMV_SETSTRIPE: we pass lmv_user_md * lum to ll_dir_setdirstripe() but not lumlen. Hence no validation of lmm_stripe_count vs lumlen. (Future issue.) In ll_dir_ioctl() IOC_LOV_GETINFO: an OOB array access/swab if lum_stripe_count (from US) does not agree with lmmsize. In ll_lov_getstripe_ea_info() we should verify that lmmsize (from wire) agrees with lmm_stripe_count. Style: In ll_lov_getstripe_ea_info() there are vars named lmmsize and lmm_size. ll_dir_setstripe() checks senselessly for LMV_USER_MAGIC. In mdt_setattr_unpack() we should check that ma_lmm_size (from RMF) agrees with sizeof(*lmm)/lmm_stripe_count. In ll_setxattr() need to verity that passed size is at least sizeof(...). lov_setstripe() is never called. Why do we have LOV_USER_MAGIC_V1 and LOV_MAGIC_V1? Why isn't one defined to be the other? And similarly for the other LOV/LMV defines. Should the MDT reint unpackers check for BE lmm_magic and swab accordingly? In ll_lov_setstripe() what is the purpose of put_user(0, &lumv1p->lmm_stripe_count)? I cannot see that llapi checks this afterwards. |