Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #66955
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Newsgroups | linux.debian.bugs.dist, linux.debian.kernel |
| Subject | Bug#959070: klibc-utils: fstype falsely claims to need an executable stack |
| Date | 2020-04-29 23:20 +0200 |
| Message-ID | <A12hz-5Vs-1@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <A0Mmt-49C-1@gated-at.bofh.it> <A0V6p-1jH-7@gated-at.bofh.it> <A10ps-4LB-17@gated-at.bofh.it> <A0Mmt-49C-1@gated-at.bofh.it> <A10ps-4LB-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Cross-posted to 2 groups.
[Multipart message — attachments visible in raw view] - view raw
On Wed, 2020-04-29 at 20:41 +0200, Helge Deller wrote:
> On 29.04.20 15:36, Ben Hutchings wrote:
> > Control: tag -1 upstream fixed-upstream patch
> >
> > On Wed, 2020-04-29 at 14:12 +1000, Russell Coker wrote:
> > > Package: klibc-utils
> > > Version: 2.0.7-1
> > > Severity: normal
> > >
> > > root@sevm:~/pol# /usr/lib/klibc/bin/fstype < /dev/sda2
> > > Segmentation fault
> > > root@sevm:~/pol# execstack -c /usr/lib/klibc/bin/fstype
> > > root@sevm:~/pol# /usr/lib/klibc/bin/fstype < /dev/sda2
> > > FSTYPE=btrfs
> > > FSSIZE=719360278528
> > >
> > > The fstype program is listed as needing an executable stack, which will cause
> > > it to crash when run on a system with a security policy preventing executable
> > > stacke. If you clear the execstack bit it appears to work correctly.
> > [...]
> >
> > I've fixed this upstream but not made a new release yet:
> >
> > https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=9d8d648e604026b32cad00a84ed6c29cbd157641
>
> On hppa/parisc we still need executable stacks for the signal trampoline return code.
> Might your patch then maybe break fstype on hppa?
> I didn't tested it...
Kees Cook mentioned that too:
https://lists.zytor.com/archives/klibc/2020-February/004273.html
but I couldn't find any sign of it in the current code.
Looking again, I see that I was confused: the *kernel* creates these
trampolines on the stack. On some architecturers (m68k and parisc)
this is done unconditionally; on others (alpha, s390, and sparc 32-bit)
it's done if sa_restorer is not set (and we don't set it for them).
Presumably m68k and parisc are actually fine at the moment, as gcc
won't disable execstack on its output. However alpha, s390, and sparc
will be broken if gcc is configured assuming the C library will set
sa_restorer and it disables execstack.
I shall make the execstack flag setting arch-dependent.
Ben.
--
Ben Hutchings
Horngren's Observation:
Among economists, the real world is often a special case.
Back to linux.debian.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Bug#959070: klibc-utils: fstype falsely claims to need an executable stack Russell Coker <russell@coker.com.au> - 2020-04-29 06:20 +0200 Bug#959070: klibc-utils: fstype falsely claims to need an executable stack Ben Hutchings <ben@decadent.org.uk> - 2020-04-29 15:40 +0200 Processed: Re: Bug#959070: klibc-utils: fstype falsely claims to need an executable stack "Debian Bug Tracking System" <owner@bugs.debian.org> - 2020-04-29 15:40 +0200 Bug#959070: klibc-utils: fstype falsely claims to need an executable stack Thorsten Glaser <tg@mirbsd.de> - 2020-04-29 21:20 +0200 Bug#959070: klibc-utils: fstype falsely claims to need an executable stack Ben Hutchings <ben@decadent.org.uk> - 2020-04-29 23:20 +0200 Bug#959070: marked as done (klibc-utils: fstype falsely claims to need an executable stack) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2020-08-21 03:00 +0200
csiph-web