CVE-2021-47633

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-47633
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-47633.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2021-47633
Related
Published
2025-02-26T06:37:05Z
Modified
2025-02-26T19:02:40.031327Z
Downstream
Summary
[none]
Details

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

ath5k: fix OOB in ath5keepromreadpcalinfo_5111

The bug was found during fuzzing. Stacktrace locates it in ath5keepromconvertpcalinfo5111. When none of the curve is selected in the loop, idx can go up to AR5KEEPROMNPDCURVES. The line makes pd out of bound. pd = &chinfo[pier].pdcurves[idx];

There are many OOB writes using pd later in the code. So I added a sanity check for idx. Checks for other loops involving AR5KEEPROMNPDCURVES are not needed as the loop index is not used outside the loops.

The patch is NOT tested with real device.

The following is the fuzzing report

BUG: KASAN: slab-out-of-bounds in ath5keepromreadpcalinfo_5111+0x126a/0x1390 [ath5k] Write of size 1 at addr ffff8880174a4d60 by task modprobe/214

CPU: 0 PID: 214 Comm: modprobe Not tainted 5.6.0 #1 Call Trace: dumpstack+0x76/0xa0 printaddressdescription.constprop.0+0x16/0x200 ? ath5keepromreadpcalinfo5111+0x126a/0x1390 [ath5k] ? ath5keepromreadpcalinfo5111+0x126a/0x1390 [ath5k] _kasanreport.cold+0x37/0x7c ? ath5keepromreadpcalinfo5111+0x126a/0x1390 [ath5k] kasanreport+0xe/0x20 ath5keepromreadpcalinfo5111+0x126a/0x1390 [ath5k] ? apictimerinterrupt+0xa/0x20 ? ath5keeprominit11apcalfreq+0xbc0/0xbc0 [ath5k] ? ath5kpcieepromread+0x228/0x3c0 [ath5k] ath5keeprominit+0x2513/0x6290 [ath5k] ? ath5keeprominit11apcalfreq+0xbc0/0xbc0 [ath5k] ? usleeprange+0xb8/0x100 ? apictimerinterrupt+0xa/0x20 ? ath5keepromreadpcalinfo2413+0x2f20/0x2f20 [ath5k] ath5khwinit+0xb60/0x1970 [ath5k] ath5kinitah+0x6fe/0x2530 [ath5k] ? kasprintf+0xa6/0xe0 ? ath5kstop+0x140/0x140 [ath5k] ? devnotice+0xf6/0xf6 ? apictimerinterrupt+0xa/0x20 ath5kpciprobe.cold+0x29a/0x3d6 [ath5k] ? ath5kpcieepromread+0x3c0/0x3c0 [ath5k] ? mutexlock+0x89/0xd0 ? ath5kpcieepromread+0x3c0/0x3c0 [ath5k] localpciprobe+0xd3/0x160 pcideviceprobe+0x23f/0x3e0 ? pcideviceremove+0x280/0x280 ? pcideviceremove+0x280/0x280 reallyprobe+0x209/0x5d0

References

Affected packages

Debian:11 / 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.10.113-1

Affected versions

5.*

5.10.46-4
5.10.46-5
5.10.70-1~bpo10+1
5.10.70-1
5.10.84-1
5.10.92-1~bpo10+1
5.10.92-1
5.10.92-2
5.10.103-1~bpo10+1
5.10.103-1
5.10.106-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

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.17.3-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.17.3-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}