Opened 8 years ago
Last modified 4 years ago
#13131 new bug
FS shell: VFS use after free error
Reported by: | jscipione | Owned by: | jscipione |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Build System | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
In the VFS subsystem CID is reporting that we have several cases where we are using a pointer after freeing it. See attached CID report for more details I believe this is caused by vnode_path_to_vnode() decrementing the ref_count of the vnode freeing it before it was expected.
Attachments (2)
Change History (8)
by , 8 years ago
Attachment: | CID 702320 and 1397511 USE_AFTER_FREE.txt added |
---|
by , 8 years ago
Attachment: | 0001-VFS-Fix-CID-702320-1397511-USE_AFTER_FREE.patch added |
---|
Patch which increments vnode ref_count before calling vnode_path_to_vnode()
comment:1 by , 8 years ago
patch: | 0 → 1 |
---|
comment:2 by , 8 years ago
Perhaps a better way to fix this would be to rewrite vnode_path_to_vnode() to not decrement the ref_count of the passed in vnode anymore.
comment:3 by , 8 years ago
Component: | System/Kernel → Build System |
---|---|
Summary: | VFS use after free error → FS shell: VFS use after free error |
Please note that the code in question is a fork of an earlier version of the kernel code. Without having looked into the issues in question, an option other than to fix the bugs in this implementation could be to update the code to the current version (respectively port the changes since the last update).
comment:4 by , 6 years ago
Does hrev52646 have an effect on this ticket or does it at least reveal the real bug culprit? Asking because this bug has to do with the vfs subsystem and ref_count being wrong causing use after free errors.
comment:5 by , 6 years ago
Uh, neither; this ticket is about the VFS shell, which uses a copy of the VFS code and hasn't been touched in quite a while.
comment:6 by , 4 years ago
Milestone: | R1 → Unscheduled |
---|
CID 702320 and 1397511 USE_AFTER_FREE