CVE-2022-48857

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

No CVSS score yet EPSS 0.21%

Published 16 Jul 2024 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2022-48857

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2022-48857 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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

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

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

port100_send_complete() 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 port100_send_complete+0x16e/0x1a0 drivers/nfc/port100.c:935 Read of size 1 at addr ffff88801bb59540 by task ksoftirqd/2/26 ... Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x303 mm/kasan/report.c:255 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 port100_send_complete+0x16e/0x1a0 drivers/nfc/port100.c:935 __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1670

...

Allocated by task 1255: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] ____kasan_kmalloc mm/kasan/common.c:515 [inline] ____kasan_kmalloc mm/kasan/common.c:474 [inline] __kasan_kmalloc+0xa6/0xd0 mm/kasan/common.c:524 alloc_dr drivers/base/devres.c:116 [inline] devm_kmalloc+0x96/0x1d0 drivers/base/devres.c:823 devm_kzalloc include/linux/device.h:209 [inline] port100_probe+0x8a/0x1320 drivers/nfc/port100.c:1502

Freed by task 1255: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:45 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free+0xff/0x140 mm/kasan/common.c:328 kasan_slab_free include/linux/kasan.h:236 [inline] __cache_free mm/slab.c:3437 [inline] kfree+0xf8/0x2b0 mm/slab.c:3794 release_nodes+0x112/0x1a0 drivers/base/devres.c:501 devres_release_all+0x114/0x190 drivers/base/devres.c:530 really_probe+0x626/0xcc0 drivers/base/dd.c:670

Exploitation

EPSS 0.21%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 11.1% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 10 Sep 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 0347a6ab300a1532c298823408d6e51ccf4e4f45, before 205c4ec78e71cbf561794e6043da80e7bae6790f
affected from 0347a6ab300a1532c298823408d6e51ccf4e4f45, before 32e866ae5a7af590597ef4bcff8451bf96d5f980
affected from 0347a6ab300a1532c298823408d6e51ccf4e4f45, before b1db33d4e54bc35d8db96ce143ea0ef92e23d58e
affected from 0347a6ab300a1532c298823408d6e51ccf4e4f45, before cd2a5c0da0d1ddf11d1f84e9c9b1949f50f6e161
affected from 0347a6ab300a1532c298823408d6e51ccf4e4f45, before 2b1c85f56512d49e43bc53741fce2f508cd90029
affected from 0347a6ab300a1532c298823408d6e51ccf4e4f45, before 0e721b8f2ee5e11376dd55363f9ccb539d754b8a
affected from 0347a6ab300a1532c298823408d6e51ccf4e4f45, before 7194737e1be8fdc89d2a9382bd2f371f7ee2eda8
affected from 0347a6ab300a1532c298823408d6e51ccf4e4f45, before f80cfe2f26581f188429c12bd937eb905ad3ac7b
Other versions: unaffected
Linux
affected 3.13
unaffected before 3.13
unaffected from 4.9.307 up to and including 4.9.*
unaffected from 4.14.272 up to and including 4.14.*
unaffected from 4.19.235 up to and including 4.19.*
unaffected from 5.4.185 up to and including 5.4.*
unaffected from 5.10.106 up to and including 5.10.*
unaffected from 5.15.29 up to and including 5.15.*
unaffected from 5.16.15 up to and including 5.16.*
unaffected 5.17 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2022-48857 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2022-48857

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2022-48857
trivy image --scanners vuln IMAGE | grep CVE-2022-48857

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2022-48857 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.