Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 205980 (CVE-2008-0001) - Linux <= 2.6.24 Directory truncation, leaving orphaned inodes (CVE-2008-0001)
Summary: Linux <= 2.6.24 Directory truncation, leaving orphaned inodes (CVE-2008-0001)
Status: RESOLVED FIXED
Alias: CVE-2008-0001
Product: Gentoo Security
Classification: Unclassified
Component: Kernel (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Security
URL: https://bugzilla.redhat.com/show_bug....
Whiteboard: [linux < 2.6.16.59][linux >= 2.6.17 <...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-15 16:02 UTC by Robert Buchholz (RETIRED)
Modified: 2013-09-05 03:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Buchholz (RETIRED) gentoo-dev 2008-01-15 16:02:04 UTC
Quoting from RedHat bug at $URL:

In kernel versions beginning with 2.6.15 and including 2.6.24-rc7, it
is possible for unprivileged local users to truncate any directory for
which they have write permission.  This renders all the contents of
the directory inaccessible.  It is then possible (given appropriate
privileges) to remove the apparently empty directory.  This can orphan
inodes that had their only link from that directory.

This issue description from LKML:

<cite>

Way back when (in commit 834f2a4a1554dc5b2598038b3fe8703defcbe467, aka
"VFS: Allow the filesystem to return a full file pointer on open intent"
to be exact), Trond changed the open logic to keep track of the original
flags to a file open, in order to pass down the the intent of a dentry
lookup to the low-level filesystem.

However, when doing that reorganization, it changed the meaning of
namei_flags, and thus inadvertently changed the test of access mode for
directories (and RO filesystem) to use the wrong flag.  So fix those
test back to use access mode ("acc_mode") rather than the open flag
("flag").

Issue noticed by Bill Roman at Datalight.

</cite>

There is also patch provided together with this issue:

patch 974a9f0b47da74e28f68b9c8645c3786aa5ace1a in mainline
Comment 1 unnamedrambler 2008-03-21 19:09:00 UTC
[linux < 2.6.16.59] fb7a7420ea718a6504e5c620ada0e42b23446b27
[linux >= 2.6.17 < 2.6.22.16] 53d06121542c36ec0f0e5504c8358a768e25cb9a
[linux >= 2.6.23 < 2.6.23.14] 3093d39c9361dae001efaea9279b0b23e38f049c

[gp < 2.6.23-7]