All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Schniedermeyer <ms@citd.de>
To: Kees Cook <kees@outflux.net>
Cc: Nick Bowler <nbowler@elliptictech.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Linux 3.6
Date: Thu, 4 Oct 2012 00:23:41 +0200	[thread overview]
Message-ID: <20121003222341.GA20263@citd.de> (raw)
In-Reply-To: <20121003200515.GZ9092@outflux.net>

On 03.10.2012 13:05, Kees Cook wrote:
> Hi Nick,
> 
> 3.6 introduced link restrictions:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=800179c9b8a1e796e441674776d11cd4c05d61d7
> 
> It sounds like you've got symlinks in a world-writable directory, and
> you're following those symlinks across mis-matched uids. You can either
> have the symlinks be owned by the directory owner, or you can turn off
> symlink restrictions in sysctl:
> 
> # echo 0 > /proc/sys/fs/protected_symlinks

According to documentation world writable isn't the problem.
It's world writable inside/or below a directory with sticky bit.
(Documentation/sysctl/fs.txt -> protected_symlinks)

So /scratch_space must have the sticky bit set.
Question is: Why?


Personally i would have been bitten by this change, because for years i 
have used a symlink in /tmp (which has the sticky bit) to a directory 
somewhere else for historical reasons. But as i was aware of this change 
i fixed my system before booting the new kernel.


> On Wed, Oct 03, 2012 at 03:46:14PM -0400, Nick Bowler wrote:
> > On 2012-09-30 17:38 -0700, Linus Torvalds wrote:
> > > So here it is, 3.6 final. Sure, I'd have been happier with even fewer
> > > changes, but that just never happens. And holding off the release
> > > until people get too bored to send me the small stuff just makes the
> > > next merge window more painful.
> > 
> > Just upgraded to 3.6 from 3.5, and now some of my kernel build scripts
> > are throwing "permission denied" errors.  Apparently symlinks are
> > broken somehow?
> > 
> >   # id
> >   uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
> > 
> >   # ls -l /scratch_space/linux
> >   drwxr-xr-x 24 nbowler eng 4096 2012-10-03 13:41 /scratch_space/linux
> > 
> >   # readlink /scratch_space/linux-2.6
> >   linux
> > 
> >   # cd /scratch_space/linux
> >   # pwd
> >   /scratch_space/linux
> > 
> >   # cd /scratch_space/linux-2.6
> >   cd: permission denied: /scratch_space/linux-2.6
> > 
> > WTF?  3.5 is fine.  I will try to bisect this later, but I figured I'd
> > throw this out there now in case anyone has any ideas...






Bis denn

-- 
Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.


  parent reply	other threads:[~2012-10-03 22:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-01  0:38 Linux 3.6 Linus Torvalds
2012-10-03 19:46 ` Nick Bowler
2012-10-03 20:05   ` Kees Cook
2012-10-03 20:29     ` Linus Torvalds
2012-10-03 20:41       ` Theodore Ts'o
2012-10-03 20:49         ` Kees Cook
2012-10-03 20:54           ` Linus Torvalds
2012-10-03 20:58             ` Kees Cook
2012-10-03 21:05               ` Alan Cox
2012-10-03 21:04                 ` Kees Cook
2012-10-04 13:35             ` Nick Bowler
2012-10-04 15:49               ` Kees Cook
2012-10-04 16:03                 ` Nick Bowler
2012-10-04 16:14                   ` Kees Cook
2012-10-04 17:16                     ` Nick Bowler
2012-10-04 21:30                       ` Stefan Richter
2012-10-09 18:51                         ` Nick Bowler
2012-10-03 20:49     ` Alan Cox
2012-10-03 22:23     ` Matthias Schniedermeyer [this message]
2012-10-03 23:58       ` Theodore Ts'o

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=20121003222341.GA20263@citd.de \
    --to=ms@citd.de \
    --cc=kees@outflux.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nbowler@elliptictech.com \
    --cc=torvalds@linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.