CVE-2021-47102

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-47102
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-47102.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-47102
Related
Published
2024-03-04T18:15:08Z
Modified
2024-09-11T02:00:04Z
Summary
[none]
Details

In the Linux kernel, the following vulnerability has been resolved:

net: marvell: prestera: fix incorrect structure access

In line: upper = info->upperdev; We access upperdev field, which is related only for particular events (e.g. event == NETDEVCHANGEUPPER). So, this line cause invalid memory access for another events, when ptr is not netdevnotifierchangeupperinfo.

The KASAN logs are as follows:

[ 30.123165] BUG: KASAN: stack-out-of-bounds in presteranetdevportevent.constprop.0+0x68/0x538 [prestera] [ 30.133336] Read of size 8 at addr ffff80000cf772b0 by task udevd/778 [ 30.139866] [ 30.141398] CPU: 0 PID: 778 Comm: udevd Not tainted 5.16.0-rc3 #6 [ 30.147588] Hardware name: DNI AmazonGo1 A7040 board (DT) [ 30.153056] Call trace: [ 30.155547] dumpbacktrace+0x0/0x2c0 [ 30.159320] showstack+0x18/0x30 [ 30.162729] dumpstacklvl+0x68/0x84 [ 30.166491] printaddressdescription.constprop.0+0x74/0x2b8 [ 30.172346] kasanreport+0x1e8/0x250 [ 30.176102] _asanload8+0x98/0xe0 [ 30.179682] presteranetdevportevent.constprop.0+0x68/0x538 [prestera] [ 30.186847] presteranetdeveventhandler+0x1b4/0x1c0 [prestera] [ 30.193313] rawnotifiercallchain+0x74/0xa0 [ 30.197860] callnetdevicenotifiersinfo+0x68/0xc0 [ 30.202924] registernetdevice+0x3cc/0x760 [ 30.207190] registernetdev+0x24/0x50 [ 30.211015] presteradeviceregister+0x8a0/0xba0 [prestera]

References

Affected packages

Debian:12 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.15.15-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.15.15-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}