CVE-2022-48857

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-48857
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-48857.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-48857
Related
Published
2024-07-16T13:15:12Z
Modified
2024-09-11T04:57:04.331367Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

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

NFC: port100: fix use-after-free in port100sendcomplete

Syzbot reported UAF in port100sendcomplete(). The root case is in missing usbkillurb() calls on error handling path of ->probe function.

port100sendcomplete() accesses devm allocated memory which will be freed on probe failure. We should kill this urbs before returning an error from probe function to prevent reported use-after-free

Fail log:

BUG: KASAN: use-after-free in port100sendcomplete+0x16e/0x1a0 drivers/nfc/port100.c:935 Read of size 1 at addr ffff88801bb59540 by task ksoftirqd/2/26 ... Call Trace: <TASK> _dumpstack lib/dumpstack.c:88 [inline] dumpstacklvl+0xcd/0x134 lib/dumpstack.c:106 printaddressdescription.constprop.0.cold+0x8d/0x303 mm/kasan/report.c:255 _kasanreport mm/kasan/report.c:442 [inline] kasanreport.cold+0x83/0xdf mm/kasan/report.c:459 port100sendcomplete+0x16e/0x1a0 drivers/nfc/port100.c:935 _usbhcdgiveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1670

...

Allocated by task 1255: kasansavestack+0x1e/0x40 mm/kasan/common.c:38 kasansettrack mm/kasan/common.c:45 [inline] setallocinfo mm/kasan/common.c:436 [inline] _kasankmalloc mm/kasan/common.c:515 [inline] kasankmalloc mm/kasan/common.c:474 [inline] _kasankmalloc+0xa6/0xd0 mm/kasan/common.c:524 allocdr drivers/base/devres.c:116 [inline] devmkmalloc+0x96/0x1d0 drivers/base/devres.c:823 devmkzalloc include/linux/device.h:209 [inline] port100_probe+0x8a/0x1320 drivers/nfc/port100.c:1502

Freed by task 1255: kasansavestack+0x1e/0x40 mm/kasan/common.c:38 kasansettrack+0x21/0x30 mm/kasan/common.c:45 kasansetfreeinfo+0x20/0x30 mm/kasan/generic.c:370 kasanslabfree mm/kasan/common.c:366 [inline] _kasanslabfree+0xff/0x140 mm/kasan/common.c:328 kasanslabfree include/linux/kasan.h:236 [inline] _cachefree mm/slab.c:3437 [inline] kfree+0xf8/0x2b0 mm/slab.c:3794 releasenodes+0x112/0x1a0 drivers/base/devres.c:501 devresreleaseall+0x114/0x190 drivers/base/devres.c:530 reallyprobe+0x626/0xcc0 drivers/base/dd.c:670

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.106-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

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

Ecosystem specific

{
    "urgency": "not yet assigned"
}