CVE-2022-49470 in Linuxinfo

Summary

by MITRE • 02/26/2025

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

Bluetooth: btmtksdio: fix use-after-free at btmtksdio_recv_event

We should not access skb buffer data anymore after hci_recv_frame was called.

[ 39.634809] BUG: KASAN: use-after-free in btmtksdio_recv_event+0x1b0
[ 39.634855] Read of size 1 at addr ffffff80cf28a60d by task kworker
[ 39.634962] Call trace:
[ 39.634974] dump_backtrace+0x0/0x3b8
[ 39.634999] show_stack+0x20/0x2c
[ 39.635016] dump_stack_lvl+0x60/0x78
[ 39.635040] print_address_description+0x70/0x2f0
[ 39.635062] kasan_report+0x154/0x194
[ 39.635079] __asan_report_load1_noabort+0x44/0x50
[ 39.635099] btmtksdio_recv_event+0x1b0/0x1c4
[ 39.635129] btmtksdio_txrx_work+0x6cc/0xac4
[ 39.635157] process_one_work+0x560/0xc5c
[ 39.635177] worker_thread+0x7ec/0xcc0
[ 39.635195] kthread+0x2d0/0x3d0
[ 39.635215] ret_from_fork+0x10/0x20
[ 39.635247] Allocated by task 0:
[ 39.635260] (stack is not available)
[ 39.635281] Freed by task 2392:
[ 39.635295] kasan_save_stack+0x38/0x68
[ 39.635319] kasan_set_track+0x28/0x3c
[ 39.635338] kasan_set_free_info+0x28/0x4c
[ 39.635357] ____kasan_slab_free+0x104/0x150
[ 39.635374] __kasan_slab_free+0x18/0x28
[ 39.635391] slab_free_freelist_hook+0x114/0x248
[ 39.635410] kfree+0xf8/0x2b4
[ 39.635427] skb_free_head+0x58/0x98
[ 39.635447] skb_release_data+0x2f4/0x410
[ 39.635464] skb_release_all+0x50/0x60
[ 39.635481] kfree_skb+0xc8/0x25c
[ 39.635498] hci_event_packet+0x894/0xca4 [bluetooth]
[ 39.635721] hci_rx_work+0x1c8/0x68c [bluetooth]
[ 39.635925] process_one_work+0x560/0xc5c
[ 39.635951] worker_thread+0x7ec/0xcc0
[ 39.635970] kthread+0x2d0/0x3d0
[ 39.635990] ret_from_fork+0x10/0x20
[ 39.636021] The buggy address belongs to the object at ffffff80cf28a600
which belongs to the cache kmalloc-512 of size 512 [ 39.636039] The buggy address is located 13 bytes inside of
512-byte region [ffffff80cf28a600, ffffff80cf28a800)

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 03/25/2025

The vulnerability described in CVE-2022-49470 represents a critical use-after-free condition within the Linux kernel's Bluetooth subsystem, specifically affecting the btmtksdio driver. This flaw occurs in the btmtksdio_recv_event function where memory is accessed after it has been freed, creating a potential pathway for arbitrary code execution or system instability. The issue manifests as a kernel memory safety violation that can be triggered through normal Bluetooth communication operations involving the MediaTek SDIO Bluetooth controller.

The technical root cause stems from improper memory management practices within the Bluetooth protocol stack where the skb (socket buffer) data structure is accessed after hci_recv_frame has been called, which subsequently frees the associated memory. According to the kernel's KASAN (Kernel Address Sanitizer) report, the memory access occurs at address ffffff80cf28a60d with a read operation of size 1, indicating that the driver attempts to read from freed memory. The call trace shows this vulnerability originates from btmtksdio_recv_event function and propagates through the btmtksdio_txrx_work worker thread, ultimately reaching the kworker process that handles Bluetooth I/O operations.

This vulnerability directly maps to CWE-416, which defines use-after-free conditions in software systems, and aligns with ATT&CK technique T1059.006 for execution through kernel-mode code injection. The operational impact of this flaw is significant as it can lead to system crashes, denial of service conditions, or potentially allow privilege escalation attacks if exploited by malicious actors. The vulnerability affects systems running Linux kernels with MediaTek SDIO Bluetooth support, particularly those implementing the btmtksdio driver for Bluetooth communication.

Mitigation strategies should prioritize immediate kernel updates to versions containing the patched btmtksdio driver implementation. System administrators should also implement monitoring for kernel memory safety violations and consider disabling Bluetooth functionality when not required. Additional defensive measures include kernel hardening configurations such as enabling KASAN and other memory safety features, implementing proper access controls for Bluetooth interfaces, and maintaining up-to-date security patches for all kernel components. The fix ensures proper memory lifecycle management by preventing access to skb buffer data after hci_recv_frame has been invoked, thereby eliminating the use-after-free condition that could be exploited to compromise system integrity.

Responsible

Linux

Reservation

02/26/2025

Disclosure

02/26/2025

Moderation

accepted

CPE

ready

EPSS

0.00246

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!