Skip to content
Fencer Vulns
high 7.8

CVE-2022-48796 json

iommu: Fix potential use-after-free during probe

published 2024-07-16 2 y ago modified 2026-08-05 3 mo ago also EUVD-2022-53675

cvss
7.8
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.3%
EPSS 0.3% chance of exploitation in 30 days, percentile 17%
public exploits
0
none known

Summary

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

iommu: Fix potential use-after-free during probe

Kasan has reported the following use after free on dev->iommu. when a device probe fails and it is in process of freeing dev->iommu in dev_iommu_free function, a deferred_probe_work_func runs in parallel and tries to access dev->iommu->fwspec in of_iommu_configure path thus causing use after free.

BUG: KASAN: use-after-free in of_iommu_configure+0xb4/0x4a4 Read of size 8 at addr ffffff87a2f1acb8 by task kworker/u16:2/153

Workqueue: events_unbound deferred_probe_work_func Call trace: dump_backtrace+0x0/0x33c show_stack+0x18/0x24 dump_stack_lvl+0x16c/0x1e0 print_address_description+0x84/0x39c __kasan_report+0x184/0x308 kasan_report+0x50/0x78 __asan_load8+0xc0/0xc4 of_iommu_configure+0xb4/0x4a4 of_dma_configure_id+0x2fc/0x4d4 platform_dma_configure+0x40/0x5c really_probe+0x1b4/0xb74 driver_probe_device+0x11c/0x228 __device_attach_driver+0x14c/0x304 bus_for_each_drv+0x124/0x1b0 __device_attach+0x25c/0x334 device_initial_probe+0x24/0x34 bus_probe_device+0x78/0x134 deferred_probe_work_func+0x130/0x1a8 process_one_work+0x4c8/0x970 worker_thread+0x5c8/0xaec kthread+0x1f8/0x220 ret_from_fork+0x10/0x18

Allocated by task 1: ____kasan_kmalloc+0xd4/0x114 __kasan_kmalloc+0x10/0x1c kmem_cache_alloc_trace+0xe4/0x3d4 __iommu_probe_device+0x90/0x394 probe_iommu_group+0x70/0x9c bus_for_each_dev+0x11c/0x19c bus_iommu_probe+0xb8/0x7d4 bus_set_iommu+0xcc/0x13c arm_smmu_bus_init+0x44/0x130 [arm_smmu] arm_smmu_device_probe+0xb88/0xc54 [arm_smmu] platform_drv_probe+0xe4/0x13c really_probe+0x2c8/0xb74 driver_probe_device+0x11c/0x228 device_driver_attach+0xf0/0x16c __driver_attach+0x80/0x320 bus_for_each_dev+0x11c/0x19c driver_attach+0x38/0x48 bus_add_driver+0x1dc/0x3a4 driver_register+0x18c/0x244 __platform_driver_register+0x88/0x9c init_module+0x64/0xff4 [arm_smmu] do_one_initcall+0x17c/0x2f0 do_init_module+0xe8/0x378 load_module+0x3f80/0x4a40 __se_sys_finit_module+0x1a0/0x1e4 __arm64_sys_finit_module+0x44/0x58 el0_svc_common+0x100/0x264 do_el0_svc+0x38/0xa4 el0_svc+0x20/0x30 el0_sync_handler+0x68/0xac el0_sync+0x160/0x180

Freed by task 1: kasan_set_track+0x4c/0x84 kasan_set_free_info+0x28/0x4c ____kasan_slab_free+0x120/0x15c __kasan_slab_free+0x18/0x28 slab_free_freelist_hook+0x204/0x2fc kfree+0xfc/0x3a4 __iommu_probe_device+0x284/0x394 probe_iommu_group+0x70/0x9c bus_for_each_dev+0x11c/0x19c bus_iommu_probe+0xb8/0x7d4 bus_set_iommu+0xcc/0x13c arm_smmu_bus_init+0x44/0x130 [arm_smmu] arm_smmu_device_probe+0xb88/0xc54 [arm_smmu] platform_drv_probe+0xe4/0x13c really_probe+0x2c8/0xb74 driver_probe_device+0x11c/0x228 device_driver_attach+0xf0/0x16c __driver_attach+0x80/0x320 bus_for_each_dev+0x11c/0x19c driver_attach+0x38/0x48 bus_add_driver+0x1dc/0x3a4 driver_register+0x18c/0x244 __platform_driver_register+0x88/0x9c init_module+0x64/0xff4 [arm_smmu] do_one_initcall+0x17c/0x2f0 do_init_module+0xe8/0x378 load_module+0x3f80/0x4a40 __se_sys_finit_module+0x1a0/0x1e4 __arm64_sys_finit_module+0x44/0x58 el0_svc_common+0x100/0x264 do_el0_svc+0x38/0xa4 el0_svc+0x20/0x30 el0_sync_handler+0x68/0xac el0_sync+0x160/0x180

Fix this by setting dev->iommu to NULL first and then freeing dev_iommu structure in dev_iommu_free function.

Patch / fix

  • Linux Linux 5.10.101, 5.15.24, 5.16.10, 5.17
  • linux Debian 14, Debian 13, Debian 12 5.16.10-1

debian advisories DEBIAN-CVE-2022-48796

  • linux-intel-iotg-5.15 Ubuntu 20.04 LTS 5.15.0-1008.11~20.04.1

ubuntu advisories UBUNTU-CVE-2022-48796

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 RHEL 9.0 E4S 5.14.0-70.121.1.el9_0
  • perf RHEL 9.0 E4S 5.14.0-70.121.1.el9_0
  • bpftool RHEL 9.0 E4S 5.14.0-70.121.1.el9_0
  • kernel-core RHEL 9.0 E4S 5.14.0-70.121.1.el9_0
  • kernel-tools RHEL 9.0 E4S 5.14.0-70.121.1.el9_0
  • python3-perf RHEL 9.0 E4S 5.14.0-70.121.1.el9_0
  • kernel-modules RHEL 9.0 E4S 5.14.0-70.121.1.el9_0
  • kernel-zfcpdump RHEL 9.0 E4S 5.14.0-70.121.1.el9_0

red hat advisories RHSA-2024:9942RHSA-2024:9943RHSA-2024:6297

  • kernel-azure SLE Module for Public Cloud 15 SP5, openSUSE Leap 15.5 5.14.21-150500.33.63.1
  • kernel-syms-azure SLE Module for Public Cloud 15 SP5, openSUSE Leap 15.5 5.14.21-150500.33.63.1
  • kernel-source-azure SLE Module for Public Cloud 15 SP5, openSUSE Leap 15.5 5.14.21-150500.33.63.1
  • dtb-aarch64 openSUSE Leap 15.5 5.14.21-150500.55.73.1
  • kernel-64kb SLE Module for Basesystem 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.73.1
  • kernel-syms SLE Module for Development Tools 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.73.1
  • kernel-obs-qa openSUSE Leap 15.5 5.14.21-150500.55.73.1
  • kernel-source SLE Module for Development Tools 15 SP5, SLE Module for Basesystem 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.73.1

suse advisories SUSE-SU-2024:2947-1SUSE-SU-2024:2939-1SUSE-SU-2024:2929-1SUSE-SU-2024:2902-1SUSE-SU-2024:2894-1

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-48796 updated cvss 7.8

kernel: iommu: Fix potential use-after-free during probe

  • Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more
    affected: workaround, no fix available
  • Red Hat Enterprise Linux AppStream E4S (v.9.0) perf 5.14.0-70.121.1.el9_0, kernel-devel-matched 5.14.0-70.121.1.el9_0, kernel-debug-devel-matched 5.14.0-70.121.1.el9_0, kernel-debuginfo-common-s390x 5.14.0-70.121.1.el9_0, kernel-zfcpdump-devel-matched 5.14.0-70.121.1.el9_0, kernel-debuginfo-common-x86_64 5.14.0-70.121.1.el9_0, +2 more
    fixed: vendor fix RHSA-2024:9942
  • Red Hat Enterprise Linux BaseOS AUS (v.8.6) perf 4.18.0-372.121.1.el8_6, kernel 4.18.0-372.121.1.el8_6, bpftool 4.18.0-372.121.1.el8_6, kernel-core 4.18.0-372.121.1.el8_6, kernel-tools 4.18.0-372.121.1.el8_6, python3-perf 4.18.0-372.121.1.el8_6, +8 more Red Hat Enterprise Linux BaseOS E4S (v.8.6) perf 4.18.0-372.121.1.el8_6, kernel 4.18.0-372.121.1.el8_6, bpftool 4.18.0-372.121.1.el8_6, kernel-core 4.18.0-372.121.1.el8_6, kernel-tools 4.18.0-372.121.1.el8_6, python3-perf 4.18.0-372.121.1.el8_6, +15 more
    fixed: vendor fix RHSA-2024:6297
  • Red Hat Enterprise Linux BaseOS E4S (v.9.0) kernel 5.14.0-70.121.1.el9_0, bpftool 5.14.0-70.121.1.el9_0, kernel-core 5.14.0-70.121.1.el9_0, kernel-tools 5.14.0-70.121.1.el9_0, python3-perf 5.14.0-70.121.1.el9_0, kernel-modules 5.14.0-70.121.1.el9_0, +14 more
    fixed: vendor fix RHSA-2024:9942
  • Red Hat Enterprise Linux BaseOS TUS (v.8.6) perf 4.18.0-372.121.1.el8_6, kernel 4.18.0-372.121.1.el8_6, bpftool 4.18.0-372.121.1.el8_6, kernel-core 4.18.0-372.121.1.el8_6, kernel-tools 4.18.0-372.121.1.el8_6, python3-perf 4.18.0-372.121.1.el8_6, +8 more
    fixed: vendor fix RHSA-2024:6297
  • Red Hat Enterprise Linux NFV E4S (v.9.0) kernel-rt 5.14.0-70.121.1.rt21.193.el9_0, kernel-rt-kvm 5.14.0-70.121.1.rt21.193.el9_0, kernel-rt-core 5.14.0-70.121.1.rt21.193.el9_0, kernel-rt-modules 5.14.0-70.121.1.rt21.193.el9_0, kernel-rt-debug-kvm 5.14.0-70.121.1.rt21.193.el9_0, kernel-rt-debug-core 5.14.0-70.121.1.rt21.193.el9_0, +4 more Red Hat Enterprise Linux Real Time E4S (v.9.0) kernel-rt 5.14.0-70.121.1.rt21.193.el9_0, kernel-rt-core 5.14.0-70.121.1.rt21.193.el9_0, kernel-rt-modules 5.14.0-70.121.1.rt21.193.el9_0, kernel-rt-debug-core 5.14.0-70.121.1.rt21.193.el9_0, kernel-rt-debug-modules 5.14.0-70.121.1.rt21.193.el9_0, kernel-rt-modules-extra 5.14.0-70.121.1.rt21.193.el9_0, +2 more
    fixed: vendor fix RHSA-2024:9943
  • Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more Red Hat Enterprise Linux BaseOS AUS (v.8.6) kernel-doc 4.18.0-372.121.1.el8_6 Red Hat Enterprise Linux BaseOS E4S (v.8.6) kernel-doc 4.18.0-372.121.1.el8_6 Red Hat Enterprise Linux BaseOS TUS (v.8.6) kernel-doc 4.18.0-372.121.1.el8_6
    not 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.26% chance of exploitation in the next 30 days, higher than 17% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD 3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

  • Linux Linux

Classification

Weakness
Technology feeds

References

Sources

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.