aboutsummaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2021-03-16 12:37:55 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2021-04-12 19:03:19 +0530
commit2ed18c5b534d9e92fc006202a5af0df6b72e7aca (patch)
treedddc17dc530bbdaa1f6fbc3bd781a70fe549aeca /support
parent061fe3f8add46a89b7453e87eabb9c4695005ced (diff)
downloadglibc-2ed18c5b534d9e92fc006202a5af0df6b72e7aca.tar
glibc-2ed18c5b534d9e92fc006202a5af0df6b72e7aca.tar.gz
glibc-2ed18c5b534d9e92fc006202a5af0df6b72e7aca.tar.bz2
glibc-2ed18c5b534d9e92fc006202a5af0df6b72e7aca.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>
Diffstat (limited to 'support')
0 files changed, 0 insertions, 0 deletions