CVE-2022-49474·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: fix dangling sco_conn and use-after-free in sco_sock_timeout Connecting the same socket twice consecutively in sco_sock_connect() could lead to a race condition where two sco_conn objects are created but only one is associated with the socket. If the socket is closed before the SCO connection is established, the timer associated with the dangling sco_conn object won't be canceled. As the sock object is being freed, the use-after-free problem happens when the timer callback function sco_sock_timeout() accesses the socket. Here's the call trace: dump_stack+0x107/0x163 ? refcount_inc+0x1c/ print_address_description.constprop.0+0x1c/0x47e ? refcount_inc+0x1c/0x7b kasan_report+0x13a/0x173 ? refcount_inc+0x1c/0x7b check_memory_region+0x132/0x139 refcount_inc+0x1c/0x7b sco_sock_timeout+0xb2/0x1ba process_one_work+0x739/0xbd1 ? cancel_delayed_work+0x13f/0x13f ? __raw_spin_lock_init+0xf0/0xf0 ? to_kthread+0x59/0x85 worker_thread+0x593/0x70e kthread+0x346/0x35a ? drain_workqueue+0x31a/0x31a ? kthread_bind+0x4b/0x4b ret_from_fork+0x1f/0x30
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.18.3
- Published
- 2025-02-26
Affected versions
From: 5.18
Until: 5.18.3
Fixed in: 5.18.3
How to fix this CVE
Update your Linux kernel to version 5.18.3 or later to patch a use-after-free vulnerability in the Bluetooth SCO socket implementation. The issue occurs when consecutive socket connections create orphaned connection objects that trigger timer callbacks on freed memory. Apply the patch through your distribution's kernel update mechanism to eliminate the race condition.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check installed kernel version with `uname -r` and compare against 5.18.3 — versions 5.18.0 through 5.18.2 are vulnerable
- Step 2: Verify if Bluetooth kernel modules are loaded with `lsmod | grep bluetooth` — systems with SCO support are at risk if unpatched
- Step 3: Search kernel logs for use-after-free KASAN warnings with `dmesg | grep -i 'use-after-free\|refcount\|sco_sock'` to detect exploitation attempts
- Step 4: After patching, confirm the new kernel is running with `uname -r` and verify it reports version 5.18.3 or higher
FAQ
What is CVE-2022-49474?
This vulnerability is a use-after-free flaw in the Linux kernel's Bluetooth SCO (Synchronous Connection Oriented) socket handler. Rapid consecutive connection attempts can leave orphaned connection objects whose timer callbacks attempt to access freed socket memory, causing a kernel crash or potential privilege escalation.
Is CVE-2022-49474 being actively exploited?
No, this vulnerability is not documented as actively exploited in the wild or listed on CISA's Known Exploited Vulnerabilities catalog, though the local attack vector and high severity warrant prompt patching.
What versions of Kernel are affected by CVE-2022-49474?
Linux kernel versions 5.18.0 through 5.18.2 are vulnerable. Version 5.18.3 and all later stable releases contain the fix.
How do I check if my server is vulnerable to CVE-2022-49474?
Run `uname -r` to display your kernel version — if it shows 5.18.0, 5.18.1, or 5.18.2, your system is vulnerable. Otherwise, if it's 5.18.3 or higher (or a different kernel series), you are not affected.
Does Defensia detect CVE-2022-49474?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Linux kernel is installed on a monitored server, CVE-2022-49474 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/36c644c63bfcaee2d3a426f45e89a9cd09799318
- https://git.kernel.org/stable/c/390d82733a953c1fabf3de9c9618091a7a9c90a6
- https://git.kernel.org/stable/c/537f619dea4e3fa8ed1f8f938abffe3615794bcc
- https://git.kernel.org/stable/c/65d347cb39e2e6bd0c2a745ad7c928998ebb0162
- https://git.kernel.org/stable/c/6f55fac0af3531cf60d11369454c41f5fc81ab3f
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2022-49474. Free for 1 server.
Get started free