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.
The product attempts to drop privileges but does not check or incorrectly checks to see if the drop succeeded.
Name | Vendor | Start Version | End Version |
---|---|---|---|
Bash | Gnu | * | 5.0 (including) |
Bash | Gnu | 5.0-beta1 (including) | 5.0-beta1 (including) |
Bash | Gnu | 5.0-beta2 (including) | 5.0-beta2 (including) |
Bash | Gnu | 5.0-patch1 (including) | 5.0-patch1 (including) |
Bash | Gnu | 5.0-patch10 (including) | 5.0-patch10 (including) |
Bash | Gnu | 5.0-patch11 (including) | 5.0-patch11 (including) |
Bash | Gnu | 5.0-patch2 (including) | 5.0-patch2 (including) |
Bash | Gnu | 5.0-patch3 (including) | 5.0-patch3 (including) |
Bash | Gnu | 5.0-patch4 (including) | 5.0-patch4 (including) |
Bash | Gnu | 5.0-patch5 (including) | 5.0-patch5 (including) |
Bash | Gnu | 5.0-patch6 (including) | 5.0-patch6 (including) |
Bash | Gnu | 5.0-patch7 (including) | 5.0-patch7 (including) |
Bash | Gnu | 5.0-patch8 (including) | 5.0-patch8 (including) |
Bash | Gnu | 5.0-patch9 (including) | 5.0-patch9 (including) |
Bash | Gnu | 5.0-rc1 (including) | 5.0-rc1 (including) |
Red Hat Enterprise Linux 8 | RedHat | bash-0:4.4.19-14.el8 | * |
Bash | Ubuntu | bionic | * |
Bash | Ubuntu | disco | * |
Bash | Ubuntu | eoan | * |
Bash | Ubuntu | esm-infra/xenial | * |
Bash | Ubuntu | focal | * |
Bash | Ubuntu | groovy | * |
Bash | Ubuntu | precise/esm | * |
Bash | Ubuntu | trusty | * |
Bash | Ubuntu | trusty/esm | * |
Bash | Ubuntu | upstream | * |
Bash | Ubuntu | xenial | * |