Bug 11412
Summary: | Crash in vfs_readlink() on intentionally corrupted ext2 fs | ||
---|---|---|---|
Product: | File System | Reporter: | Sami Liedes (sami.liedes) |
Component: | ext2 | Assignee: | Andrew Morton (akpm) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | alan, duaneg |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.27-rc4 + patches for #10976 & #11266 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Sami Liedes
2008-08-23 07:03:14 UTC
It looks like there is no check that the link name is NULL-terminated on disk. Since ext2_follow_link sets the name pointer to point into the inode data we can't just unconditionally NULL-terminate. Changing that to allocate and copy it into a buffer wouldn't be very nice. Unless I'm missing something (quite possible) the generic page_follow_link_light function has the same issue. If so then ext2 along with a whole bunch of other filesystems will still be affected, even if the first case is fixed. It would probably be useful to get an image that showed this problem, even though it doesn't happen every time. |