Bug 10878
Summary: | [security] VFS: DoSsable by user by holding open many /proc/$pid directories | ||
---|---|---|---|
Product: | File System | Reporter: | Sami Liedes (sami.liedes) |
Component: | VFS | Assignee: | fs_vfs |
Status: | CLOSED PATCH_ALREADY_AVAILABLE | ||
Severity: | blocking | CC: | adobriyan, akpm, oleg |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.25.4 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Attachments: | Test case |
Description
Sami Liedes
2008-06-06 14:36:23 UTC
Created attachment 16418 [details]
Test case
hm, well that's pretty sad. Alexey, Oleg: would one of you be able to take a look please? On 06/06, bugme-daemon@bugzilla.kernel.org wrote: > > http://bugzilla.kernel.org/show_bug.cgi?id=10878 Can't reproduce on 2.6.26-rc2 ... I doubt this is related to the proc management, looks like the pipe inode was killed twice? Sami, could you try to reproduce this BUG whith another test? Say, just open "/dev/null" until "VFS: file-max limit %d reached", and then ls. For example, $ su -c 'echo 512 >> /proc/sys/fs/file-max' $ $ perl -le 'for (;;) { open my $fd, "</dev/null" or last; push @_, $fd; } print 0+@_," $!"; sleep;' and, on another console $ ls Oleg. On 06/07, Oleg Nesterov wrote: > > On 06/06, bugme-daemon@bugzilla.kernel.org wrote: > > > > http://bugzilla.kernel.org/show_bug.cgi?id=10878 > > Can't reproduce on 2.6.26-rc2 ... > > I doubt this is related to the proc management, looks like > the pipe inode was killed twice? Aha. Could you re-test with this [PATCH] double-free of inode on alloc_file() failure exit in create_write_pipe() http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ed1524371716466e9c762808b02601d0d0276a92 patch? it looks very promising... Oleg. Your perl script crashes too. Now testing with that patch. Yes, that patch fixes the issue. On 06/07, bugme-daemon@bugzilla.kernel.org wrote: > > http://bugzilla.kernel.org/show_bug.cgi?id=10878 > > ------- Comment #6 from sliedes@cc.hut.fi 2008-06-07 09:34 ------- > Yes, that patch fixes the issue. Thanks a lot! Please close this BUG. May I suggest you to send that patch to stable@kernel.org ? Oleg. Ok, I'll do that. |