bash uninitialized memory access

Bug #1827499 reported by Nick Cleaton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
New
Undecided
Unassigned

Bug Description

The following gives an error message that suggests that bash is reading from uninitialized memory:

bash -c 'foo() { declare -n bar=baz; declare -A bar; bar[x]=y; }; foo'
environment: line 0: `�d�K�U': not a valid identifier

The short string of garbled characters is different on each run.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: bash 4.4.18-2ubuntu1
ProcVersionSignature: Ubuntu 4.15.0-47.50-generic 4.15.18
Uname: Linux 4.15.0-47-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.9-0ubuntu7.6
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Fri May 3 11:07:11 2019
ProcEnviron:
 TERM=screen
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: bash
UpgradeStatus: Upgraded to bionic on 2019-04-02 (30 days ago)

Revision history for this message
Nick Cleaton (ncleaton) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Confirmed in bionic and it's fixed in 5.0/disco

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.