diff options
author | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2021-03-16 12:37:55 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2021-04-14 10:58:20 +0530 |
commit | 7341e72bc2cf46ec8823baf5d4d97c41e6d1ed22 (patch) | |
tree | fb44b3956ef9876c988c899a20be2798c33d14dc /sysdeps/x86_64 | |
parent | 5661d967a539e3b87fe3839601e5eaa3a50230cd (diff) | |
download | glibc-7341e72bc2cf46ec8823baf5d4d97c41e6d1ed22.tar.gz glibc-7341e72bc2cf46ec8823baf5d4d97c41e6d1ed22.tar.xz glibc-7341e72bc2cf46ec8823baf5d4d97c41e6d1ed22.zip |
Fix SXID_ERASE behavior in setuid programs (BZ #27471)
When parse_tunables tries to erase a tunable marked as SXID_ERASE for setuid programs, it ends up setting the envvar string iterator incorrectly, because of which it may parse the next tunable incorrectly. Given that currently the implementation allows malformed and unrecognized tunables pass through, it may even allow SXID_ERASE tunables to go through. This change revamps the SXID_ERASE implementation so that: - Only valid tunables are written back to the tunestr string, because of which children of SXID programs will only inherit a clean list of identified tunables that are not SXID_ERASE. - Unrecognized tunables get scrubbed off from the environment and subsequently from the child environment. - This has the side-effect that a tunable that is not identified by the setxid binary, will not be passed on to a non-setxid child even if the child could have identified that tunable. This may break applications that expect this behaviour but expecting such tunables to cross the SXID boundary is wrong. Reviewed-by: Carlos O'Donell <carlos@redhat.com> (cherry picked from commit 2ed18c5b534d9e92fc006202a5af0df6b72e7aca)
Diffstat (limited to 'sysdeps/x86_64')
0 files changed, 0 insertions, 0 deletions