[LU-8372] Suspicious dereference of pointer 'vma->vm_file' in ll_vm_{open|close} Created: 06/Jul/16 Updated: 13/Jul/16 Resolved: 13/Jul/16 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.9.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Dmitry Eremin (Inactive) | Assignee: | Dmitry Eremin (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | kw | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
static void ll_vm_open(struct vm_area_struct * vma) { struct inode *inode = file_inode(vma->vm_file); <== 'vma->vm_file' is dereferenced by being passed as argument 1 to function 'file_inode'. struct vvp_object *vob = cl_inode2vvp(inode); ENTRY; LASSERT(vma->vm_file); <== 'vma->vm_file' is checked for NULL. LASSERT(atomic_read(&vob->vob_mmap_cnt) >= 0); atomic_inc(&vob->vob_mmap_cnt); EXIT; } So, LASSERT(vma->vm_file) is useless because if it's NULL it will crash in file_inode(vma->vm_file). |
| Comments |
| Comment by Gerrit Updater [ 06/Jul/16 ] |
|
Dmitry Eremin (dmitry.eremin@intel.com) uploaded a new patch: http://review.whamcloud.com/21171 |
| Comment by Gerrit Updater [ 12/Jul/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/21171/ |
| Comment by Joseph Gmitter (Inactive) [ 13/Jul/16 ] |
|
Landed to master for 2.9.0 |