CVE-2022-48857 json
NFC: port100: fix use-after-free in port100_send_complete
published 2024-07-16 2 y ago modified 2026-06-17 4 mo ago also EUVD-2022-53736
- cvss
- 5.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 10%
- public exploits
- 0
- none known
Summary
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
Patch / fix
- Linux Linux 4.9.307, 4.14.272, 4.19.235, 5.4.185, 5.10.106, 5.15.29, 5.16.15, 5.17
- linux Debian 14, Debian 13, Debian 12 5.16.18-1
debian advisories DEBIAN-CVE-2022-48857
- linux Ubuntu 18.04 LTS 4.15.0-184.194
- linux Ubuntu 20.04 LTS 5.4.0-117.132
- linux-aws Ubuntu 18.04 LTS 4.15.0-1133.143
- linux-aws Ubuntu 20.04 LTS 5.4.0-1078.84
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1078.84
- linux-ibm Ubuntu 20.04 LTS 5.4.0-1026.29
- linux-iot Ubuntu 20.04 LTS 5.4.0-1004.6
- linux-kvm Ubuntu 18.04 LTS 4.15.0-1119.123
ubuntu advisories UBUNTU-CVE-2022-48857
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel-64kb SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS, Enterprise Storage 7.1 5.3.18-150300.59.174.1
- kernel-syms SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS +1 more 5.3.18-150300.59.174.1
- kernel-source SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS +1 more 5.3.18-150300.59.174.1
- kernel-default SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE Micro 5.2 +5 more 5.3.18-150300.59.174.1
- kernel-preempt SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS +1 more 5.3.18-150300.59.174.1
- kernel-obs-build SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS +1 more 5.3.18-150300.59.174.1
- kernel-default-base SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE Micro 5.2 +3 more 5.3.18-150300.59.174.1.150300.18.103.1
- kernel-rt SLE Micro 5.2, SLE Micro 5.1 5.3.18-150300.181.2
suse advisories SUSE-SU-2024:3249-1SUSE-SU-2024:3225-1SUSE-SU-2024:2947-1SUSE-SU-2024:2940-1SUSE-SU-2024:2939-1SUSE-SU-2024:2929-1
- git.kernel.org/stable/c/205c4ec78e71cbf561794e6043da80e7bae6790f commit
- git.kernel.org/stable/c/32e866ae5a7af590597ef4bcff8451bf96d5f980 commit
- git.kernel.org/stable/c/b1db33d4e54bc35d8db96ce143ea0ef92e23d58e commit
- git.kernel.org/stable/c/cd2a5c0da0d1ddf11d1f84e9c9b1949f50f6e161 commit
- git.kernel.org/stable/c/2b1c85f56512d49e43bc53741fce2f508cd90029 commit
- git.kernel.org/stable/c/0e721b8f2ee5e11376dd55363f9ccb539d754b8a commit
- git.kernel.org/stable/c/7194737e1be8fdc89d2a9382bd2f371f7ee2eda8 commit
- git.kernel.org/stable/c/f80cfe2f26581f188429c12bd937eb905ad3ac7b commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-48857 updated cvss 6.6
kernel: NFC: port100: fix use-after-free in port100_send_complete
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.21% chance of exploitation in the next 30 days, higher than 10% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-416 Use After Free
- Technology feeds
References
-
git.kernel.org
/stable/c/205c4ec78e71cbf561794e6043da80e7bae6790f
patch
-
git.kernel.org
/stable/c/32e866ae5a7af590597ef4bcff8451bf96d5f980
patch
-
git.kernel.org
/stable/c/b1db33d4e54bc35d8db96ce143ea0ef92e23d58e
patch
-
git.kernel.org
/stable/c/cd2a5c0da0d1ddf11d1f84e9c9b1949f50f6e161
patch
-
git.kernel.org
/stable/c/2b1c85f56512d49e43bc53741fce2f508cd90029
patch
-
git.kernel.org
/stable/c/0e721b8f2ee5e11376dd55363f9ccb539d754b8a
patch
-
git.kernel.org
/stable/c/7194737e1be8fdc89d2a9382bd2f371f7ee2eda8
patch
-
git.kernel.org
/stable/c/f80cfe2f26581f188429c12bd937eb905ad3ac7b
patch
Sources
- CVE List CVE-2022-48857
- NVD CVE-2022-48857
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.