Bug 24986 - alpha: new getegid, geteuid and getppid syscalls used unconditionally
Summary: alpha: new getegid, geteuid and getppid syscalls used unconditionally
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: 2.31
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-10 10:52 UTC by Aurelien Jarno
Modified: 2019-10-04 21:53 UTC (History)
2 users (show)

See Also:
Host: alphaev67-unknown-linux-gnu
Target: alphaev67-unknown-linux-gnu
Build: alphaev67-unknown-linux-gnu
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aurelien Jarno 2019-09-10 10:52:54 UTC
On alpha, Linux kernel 5.1 added the standard getegid, geteuid and getppid syscalls in commit ecf7e0a4ad15287. Those are used unconditionally when the glibc is built against >= 5.1 kernel headers, therefore breaking those function on older kernels.
Comment 1 Sourceware Commits 2019-09-14 16:26:49 UTC
The master branch has been updated by Aurelien Jarno <aurel32@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1a6566094d3097f4a3037ab5555cddc6cb11c3a3

commit 1a6566094d3097f4a3037ab5555cddc6cb11c3a3
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Sat Sep 14 18:22:52 2019 +0200

    alpha: force old OSF1 syscalls for getegid, geteuid and getppid [BZ #24986]
    
    On alpha, Linux kernel 5.1 added the standard getegid, geteuid and
    getppid syscalls (commit ecf7e0a4ad15287). Up to now alpha was using
    the corresponding OSF1 syscalls through:
     - sysdeps/unix/alpha/getegid.S
     - sysdeps/unix/alpha/geteuid.S
     - sysdeps/unix/alpha/getppid.S
    
    When building against kernel headers >= 5.1, the glibc now use the new
    syscalls through sysdeps/unix/sysv/linux/syscalls.list. When it is then
    used with an older kernel, the corresponding 3 functions fail.
    
    A quick fix is to move the OSF1 wrappers under the
    sysdeps/unix/sysv/linux/alpha directory so they override the standard
    linux ones. A better fix would be to try the new syscalls and fallback
    to the old OSF1 in case the new ones fail. This can be implemented in
    a later commit.
    
    Changelog:
    	[BZ #24986]
            * sysdeps/unix/alpha/getegid.S: Move to ...
    	* sysdeps/unix/sysv/linux/alpha/getegid.S: ... here.
            * sysdeps/unix/alpha/geteuid.S: Move to ...
    	* sysdeps/unix/sysv/linux/alpha/geteuid.S: ... here.
            * sysdeps/unix/alpha/getppid.S: Move to ...
    	* sysdeps/unix/sysv/linux/alpha/getppid.S: ... here
Comment 2 Aurelien Jarno 2019-09-14 18:07:02 UTC
Fixed in commit 1a6566094d3097f4a3037ab5555cddc6cb11c3a3
Comment 3 Sourceware Commits 2019-09-14 18:09:43 UTC
The release/2.30/master branch has been updated by Aurelien Jarno <aurel32@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b1299aab223503e3ba2b447c3ec4f6f0197aa824

commit b1299aab223503e3ba2b447c3ec4f6f0197aa824
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Sat Sep 14 18:22:52 2019 +0200

    alpha: force old OSF1 syscalls for getegid, geteuid and getppid [BZ #24986]
    
    On alpha, Linux kernel 5.1 added the standard getegid, geteuid and
    getppid syscalls (commit ecf7e0a4ad15287). Up to now alpha was using
    the corresponding OSF1 syscalls through:
     - sysdeps/unix/alpha/getegid.S
     - sysdeps/unix/alpha/geteuid.S
     - sysdeps/unix/alpha/getppid.S
    
    When building against kernel headers >= 5.1, the glibc now use the new
    syscalls through sysdeps/unix/sysv/linux/syscalls.list. When it is then
    used with an older kernel, the corresponding 3 functions fail.
    
    A quick fix is to move the OSF1 wrappers under the
    sysdeps/unix/sysv/linux/alpha directory so they override the standard
    linux ones. A better fix would be to try the new syscalls and fallback
    to the old OSF1 in case the new ones fail. This can be implemented in
    a later commit.
    
    Changelog:
    	[BZ #24986]
            * sysdeps/unix/alpha/getegid.S: Move to ...
    	* sysdeps/unix/sysv/linux/alpha/getegid.S: ... here.
            * sysdeps/unix/alpha/geteuid.S: Move to ...
    	* sysdeps/unix/sysv/linux/alpha/geteuid.S: ... here.
            * sysdeps/unix/alpha/getppid.S: Move to ...
    	* sysdeps/unix/sysv/linux/alpha/getppid.S: ... here
    (cherry picked from commit 1a6566094d3097f4a3037ab5555cddc6cb11c3a3)
Comment 4 Sourceware Commits 2019-09-14 18:13:16 UTC
The release/2.29/master branch has been updated by Aurelien Jarno <aurel32@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a132a2c305f91e4f85de00566f308eae8d95d8bf

commit a132a2c305f91e4f85de00566f308eae8d95d8bf
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Sat Sep 14 18:22:52 2019 +0200

    alpha: force old OSF1 syscalls for getegid, geteuid and getppid [BZ #24986]
    
    On alpha, Linux kernel 5.1 added the standard getegid, geteuid and
    getppid syscalls (commit ecf7e0a4ad15287). Up to now alpha was using
    the corresponding OSF1 syscalls through:
     - sysdeps/unix/alpha/getegid.S
     - sysdeps/unix/alpha/geteuid.S
     - sysdeps/unix/alpha/getppid.S
    
    When building against kernel headers >= 5.1, the glibc now use the new
    syscalls through sysdeps/unix/sysv/linux/syscalls.list. When it is then
    used with an older kernel, the corresponding 3 functions fail.
    
    A quick fix is to move the OSF1 wrappers under the
    sysdeps/unix/sysv/linux/alpha directory so they override the standard
    linux ones. A better fix would be to try the new syscalls and fallback
    to the old OSF1 in case the new ones fail. This can be implemented in
    a later commit.
    
    Changelog:
    	[BZ #24986]
            * sysdeps/unix/alpha/getegid.S: Move to ...
    	* sysdeps/unix/sysv/linux/alpha/getegid.S: ... here.
            * sysdeps/unix/alpha/geteuid.S: Move to ...
    	* sysdeps/unix/sysv/linux/alpha/geteuid.S: ... here.
            * sysdeps/unix/alpha/getppid.S: Move to ...
    	* sysdeps/unix/sysv/linux/alpha/getppid.S: ... here