]> code.ossystems Code Review - openembedded-core.git/commit
bash: fix CVE-2019-18276
authorDe Huo <De.Huo@windriver.com>
Thu, 24 Sep 2020 02:39:44 +0000 (10:39 +0800)
committerSteve Sakoman <steve@sakoman.com>
Wed, 30 Sep 2020 14:35:15 +0000 (04:35 -1000)
commitaee0f56a9b3b510649672d0b4427a0e94a001ec4
tree1bfe637837d210102d075b253fcc91abee262ec6
parent130695364281f62b9e00d311c21f7acb5a1204a1
bash: fix CVE-2019-18276

An issue was discovered in disable_priv_mode in shell.c in GNU Bash
through 5.0 patch 11. By default, if Bash is run with its effective UID
not equal to its real UID, it will drop privileges by setting its
effective UID to its real UID. However, it does so incorrectly. On Linux
and other systems that support "saved UID" functionality, the saved UID
is not dropped. An attacker with command execution in the shell can use
"enable -f" for runtime loading of a new builtin, which can be a shared
object that calls setuid() and therefore regains privileges. However,
binaries running with an effective UID of 0 are unaffected.

Get the patch from [1] to fix the issue.

[1] https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=951bdaa

Signed-off-by: De Huo <De.Huo@windriver.com>
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6f01acae9c279e0a580f46d1ba4c015caa3f8c2c)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-extended/bash/bash/bash-CVE-2019-18276.patch [new file with mode: 0644]
meta/recipes-extended/bash/bash_5.0.bb