Linux Kernel bis 5.15.32/5.16.18/5.17.1 xsk_unbind_dev Denial of Service

CVSS Meta Temp ScoreAktueller Exploitpreis (≈)CTI Interest Score
4.6$0-$5k0.00

Zusammenfassunginfo

Eine Schwachstelle wurde in Linux Kernel bis 5.15.32/5.16.18/5.17.1 gefunden. Sie wurde als kritisch eingestuft. Es betrifft die Funktion xsk_unbind_dev. Mit der Manipulation mit unbekannten Daten kann eine Denial of Service-Schwachstelle ausgenutzt werden. Die Identifikation der Schwachstelle findet als CVE-2022-49215 statt. Es steht kein Exploit zur Verfügung. Es wird geraten, die betroffene Komponente zu aktualisieren.

Detailsinfo

Eine Schwachstelle wurde in Linux Kernel bis 5.15.32/5.16.18/5.17.1 ausgemacht. Sie wurde als kritisch eingestuft. Es geht hierbei um die Funktion xsk_unbind_dev. Mit der Manipulation mit einer unbekannten Eingabe kann eine Denial of Service-Schwachstelle ausgenutzt werden. Klassifiziert wurde die Schwachstelle durch CWE als CWE-476. Auswirken tut sich dies auf die Verfügbarkeit. Die Zusammenfassung von CVE lautet:

In the Linux kernel, the following vulnerability has been resolved: xsk: Fix race at socket teardown Fix a race in the xsk socket teardown code that can lead to a NULL pointer dereference splat. The current xsk unbind code in xsk_unbind_dev() starts by setting xs->state to XSK_UNBOUND, sets xs->dev to NULL and then waits for any NAPI processing to terminate using synchronize_net(). After that, the release code starts to tear down the socket state and free allocated memory. BUG: kernel NULL pointer dereference, address: 00000000000000c0 PGD 8000000932469067 P4D 8000000932469067 PUD 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 25 PID: 69132 Comm: grpcpp_sync_ser Tainted: G I 5.16.0+ #2 Hardware name: Dell Inc. PowerEdge R730/0599V5, BIOS 1.2.10 03/09/2015 RIP: 0010:__xsk_sendmsg+0x2c/0x690 [...] RSP: 0018:ffffa2348bd13d50 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000040 RCX: ffff8d5fc632d258 RDX: 0000000000400000 RSI: ffffa2348bd13e10 RDI: ffff8d5fc5489800 RBP: ffffa2348bd13db0 R08: 0000000000000000 R09: 00007ffffffff000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8d5fc5489800 R13: ffff8d5fcb0f5140 R14: ffff8d5fcb0f5140 R15: 0000000000000000 FS: 00007f991cff9400(0000) GS:ffff8d6f1f700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000c0 CR3: 0000000114888005 CR4: 00000000001706e0 Call Trace: ? aa_sk_perm+0x43/0x1b0 xsk_sendmsg+0xf0/0x110 sock_sendmsg+0x65/0x70 __sys_sendto+0x113/0x190 ? debug_smp_processor_id+0x17/0x20 ? fpregs_assert_state_consistent+0x23/0x50 ? exit_to_user_mode_prepare+0xa5/0x1d0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x3b/0xc0 entry_SYSCALL_64_after_hwframe+0x44/0xae There are two problems with the current code. First, setting xs->dev to NULL before waiting for all users to stop using the socket is not correct. The entry to the data plane functions xsk_poll(), xsk_sendmsg(), and xsk_recvmsg() are all guarded by a test that xs->state is in the state XSK_BOUND and if not, it returns right away. But one process might have passed this test but still have not gotten to the point in which it uses xs->dev in the code. In this interim, a second process executing xsk_unbind_dev() might have set xs->dev to NULL which will lead to a crash for the first process. The solution here is just to get rid of this NULL assignment since it is not used anymore. Before commit 42fddcc7c64b ("xsk: use state member for socket synchronization"), xs->dev was the gatekeeper to admit processes into the data plane functions, but it was replaced with the state variable xs->state in the aforementioned commit. The second problem is that synchronize_net() does not wait for any process in xsk_poll(), xsk_sendmsg(), or xsk_recvmsg() to complete, which means that the state they rely on might be cleaned up prematurely. This can happen when the notifier gets called (at driver unload for example) as it uses xsk_unbind_dev(). Solve this by extending the RCU critical region from just the ndo_xsk_wakeup to the whole functions mentioned above, so that both the test of xs->state == XSK_BOUND and the last use of any member of xs is covered by the RCU critical section. This will guarantee that when synchronize_net() completes, there will be no processes left executing xsk_poll(), xsk_sendmsg(), or xsk_recvmsg() and state can be cleaned up safely. Note that we need to drop the RCU lock for the skb xmit path as it uses functions that might sleep. Due to this, we have to retest the xs->state after we grab the mutex that protects the skb xmit code from, among a number of things, an xsk_unbind_dev() being executed from the notifier at the same time.

Das Advisory findet sich auf git.kernel.org. Die Verwundbarkeit wird seit dem 26.02.2025 mit der eindeutigen Identifikation CVE-2022-49215 gehandelt. Die Ausnutzbarkeit gilt als schwierig. Zur Schwachstelle sind technische Details bekannt, ein verfügbarer Exploit jedoch nicht.

Für den Vulnerability Scanner Nessus wurde ein Plugin mit der ID 238183 (EulerOS 2.0 SP12 : kernel (EulerOS-SA-2025-1590)) herausgegeben, womit die Existenz der Schwachstelle geprüft werden kann.

Ein Aktualisieren auf die Version 5.15.33, 5.16.19 oder 5.17.2 vermag dieses Problem zu lösen. Die Schwachstelle lässt sich auch durch das Einspielen des Patches ad7219cd8751bd258b9d1e69ae0654ec00f71875/d1579253ffce39986e7a6ab757ac93b2680a665f/8a2dea162b92c322f3e42eae0c4a74b8d20aa7a9/18b1ab7aa76bde181bdb1ab19a87fa9523c32f21 lösen. Dieser kann von git.kernel.org bezogen werden. Als bestmögliche Massnahme wird das Upgrade auf eine neue Version empfohlen.

Unter anderem wird der Fehler auch in der Verwundbarkeitsdatenbank von Tenable (238183) dokumentiert. Be aware that VulDB is the high quality source for vulnerability data.

Produktinfo

Typ

Hersteller

Name

Version

Lizenz

Webseite

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Zuverlässigkeit: 🔍

CVSSv3info

VulDB Meta Base Score: 4.8
VulDB Meta Temp Score: 4.6

VulDB Base Score: 4.8
VulDB Temp Score: 4.6
VulDB Vector: 🔍
VulDB Zuverlässigkeit: 🔍

NVD Base Score: 4.7
NVD Vector: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VektorKomplexitätAuthentisierungVertraulichkeitIntegritätVerfügbarkeit
freischaltenfreischaltenfreischaltenfreischaltenfreischaltenfreischalten
freischaltenfreischaltenfreischaltenfreischaltenfreischaltenfreischalten
freischaltenfreischaltenfreischaltenfreischaltenfreischaltenfreischalten

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Zuverlässigkeit: 🔍

Exploitinginfo

Klasse: Denial of Service
CWE: CWE-476 / CWE-404
CAPEC: 🔍
ATT&CK: 🔍

Physisch: Teilweise
Lokal: Ja
Remote: Teilweise

Verfügbarkeit: 🔍
Status: Nicht definiert

EPSS Score: 🔍
EPSS Percentile: 🔍

Preisentwicklung: 🔍
Aktuelle Preisschätzung: 🔍

0-Dayfreischaltenfreischaltenfreischaltenfreischalten
Heutefreischaltenfreischaltenfreischaltenfreischalten

Nessus ID: 238183
Nessus Name: EulerOS 2.0 SP12 : kernel (EulerOS-SA-2025-1590)

Threat Intelligenceinfo

Interesse: 🔍
Aktive Akteure: 🔍
Aktive APT Gruppen: 🔍

Gegenmassnahmeninfo

Empfehlung: Upgrade
Status: 🔍

0-Day Time: 🔍

Upgrade: Kernel 5.15.33/5.16.19/5.17.2
Patch: ad7219cd8751bd258b9d1e69ae0654ec00f71875/d1579253ffce39986e7a6ab757ac93b2680a665f/8a2dea162b92c322f3e42eae0c4a74b8d20aa7a9/18b1ab7aa76bde181bdb1ab19a87fa9523c32f21

Timelineinfo

26.02.2025 🔍
26.02.2025 +0 Tage 🔍
26.02.2025 +0 Tage 🔍
12.06.2025 +106 Tage 🔍

Quelleninfo

Hersteller: kernel.org

Advisory: git.kernel.org
Status: Bestätigt

CVE: CVE-2022-49215 (🔍)
GCVE (CVE): GCVE-0-2022-49215
GCVE (VulDB): GCVE-100-297431

Eintraginfo

Erstellt: 26.02.2025 11:36
Aktualisierung: 12.06.2025 19:58
Anpassungen: 26.02.2025 11:36 (58), 19.03.2025 05:27 (10), 12.06.2025 19:58 (2)
Komplett: 🔍
Cache ID: 216::103

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

Diskussion

Bisher keine Kommentare. Sprachen: de + en.

Bitte loggen Sie sich ein, um kommentieren zu können.

Want to stay up to date on a daily basis?

Enable the mail alert feature now!