From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: NiTRo <nitroml@ntd.homelinux.org>
Cc: linux-kernel@vger.kernel.org, cve@mitre.org,
Pavel Machek <pavel@ucw.cz>, Jamie Lokier <jamie@shareable.org>
Subject: Re: SECURITY PROBLEM: filesystem permiossion bypass on FD already opened
Date: Fri, 23 Oct 2009 22:44:44 +0200 [thread overview]
Message-ID: <20091023204442.GA7332@joi.lan> (raw)
In-Reply-To: <4AE20B6F.4060606@ntd.homelinux.org>
On Fri, Oct 23, 2009 at 10:00:47PM +0200, NiTRo wrote:
> Hi to all,
> Sorry for my bad english.
> Just discovered this security problem on my Suse 11 (Linux xxxx
You did not.
http://lkml.org/lkml/2009/10/23/159
> 2.6.25.18-0.2-pae #1 SMP 2008-10-21 16:30:26 +0200 i686 i686 i386
> GNU/Linux) and my Slackware 10.1.0 (Linux xxxx 2.4.29-ow1 #1 Wed Feb 2
> 00:05:42 CET 2005 i586 unknown unknown GNU/Linux) with OpenWall patch.
> If a FD is opened on a allowed file and then the permission is changed
> the file is still redeable starting from the already read position to
> the EOF.
>
> This is the scenario:
>
> <root> creates a file /tmp/aaaa with 666 permission an with the "test"
> string inside it
> xxx:/tmp # echo test > /tmp/aaaa
> xxx:/tmp # chmod 666 /tmp/aaaa
> <sb> opens this file hooking it in a shell as FD number 3
> sb@xxx:~> bash 3< /tmp/aaaa
> <sb> read and prints it
> sb@xxx:~> read a <&3
> sb@xxx:~> echo $a
> test
> sb@xxx:~>
> ...anythig as expected...
> <root> changes the permissions on file to 600 and changes its content
> into "test o.o I cannot believe it..."
> xxx:/tmp # chmod 600 /tmp/aaaa
> xxx:/tmp # echo "test o.o I cannot believe it..." > /tmp/aaaa
> <sb> continue to try reading the file
> sb@xxx:~> read a <&3
> sb@xxx:~> echo $a
> o.o I cannot believe it...
> sb@test:~>
> ... and this is not expected...
>
> Writing control seems to be working fine... "bash: echo: write error:
> Bad file descriptor"
>
> Hope this can help...
>
> Thanks to all
> Alessandro Soraruf
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2009-10-23 20:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-23 20:00 NiTRo
2009-10-23 20:44 ` Marcin Slusarz [this message]
2009-10-23 20:54 ` Pavel Machek
2009-10-23 22:42 ` NiTRo
2009-10-23 20:59 ` Pavel Machek
2009-10-23 22:55 ` David Wagner
2009-10-25 6:30 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091023204442.GA7332@joi.lan \
--to=marcin.slusarz@gmail.com \
--cc=cve@mitre.org \
--cc=jamie@shareable.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nitroml@ntd.homelinux.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome