File bug1130324-CVE-2019-9924.patch of Package bash.18439
CVE-2019-9924: bash: BASH_CMD is writable in restricted bash shells
---
variables.c | 7 +++++++
1 file changed, 7 insertions(+)
--- variables.c
+++ variables.c 2019-03-25 13:06:11.081831531 +0000
@@ -1628,6 +1628,13 @@ assign_hashcmd (self, value, ind, key)
arrayind_t ind;
char *key;
{
+#if defined (RESTRICTED_SHELL)
+ if (restricted && strchr (value, '/'))
+ {
+ sh_restricted (value);
+ return (SHELL_VAR *)NULL;
+ }
+#endif
phash_insert (key, value, 0, 0);
return (build_hashcmd (self));
}