Linux Kernel bis 6.16-rc3 af_unix net/unix/af_unix.c unix_stream_read_generic Pufferüberlauf

| CVSS Meta Temp Score | Aktueller Exploitpreis (≈) | CTI Interest Score |
|---|---|---|
| 7.7 | $0-$5k | 0.66 |
Zusammenfassung
Es wurde eine Schwachstelle in Linux Kernel bis 6.1.142/6.6.95/6.12.35/6.15.4/6.16-rc3 entdeckt. Sie wurde als kritisch eingestuft. Betroffen ist die Funktion unix_stream_read_generic der Datei net/unix/af_unix.c der Komponente af_unix. Mittels dem Manipulieren mit unbekannten Daten kann eine Pufferüberlauf-Schwachstelle ausgenutzt werden.
Die Identifikation der Schwachstelle wird mit CVE-2025-38236 vorgenommen. Es existiert kein Exploit.
Ein Upgrade der betroffenen Komponente wird empfohlen.
Details
Es wurde eine kritische Schwachstelle in Linux Kernel bis 6.1.142/6.6.95/6.12.35/6.15.4/6.16-rc3 ausgemacht. Es geht dabei um die Funktion unix_stream_read_generic der Datei net/unix/af_unix.c der Komponente af_unix. Durch Manipulieren mit einer unbekannten Eingabe kann eine Pufferüberlauf-Schwachstelle ausgenutzt werden. Im Rahmen von CWE wurde eine Klassifizierung als CWE-416 vorgenommen. Das hat Auswirkungen auf Vertraulichkeit, Integrität und Verfügbarkeit. CVE fasst zusammen:
In the Linux kernel, the following vulnerability has been resolved:
af_unix: Don't leave consecutive consumed OOB skbs.
Jann Horn reported a use-after-free in unix_stream_read_generic().
The following sequences reproduce the issue:
$ python3
from socket import *
s1, s2 = socketpair(AF_UNIX, SOCK_STREAM)
s1.send(b'x', MSG_OOB)
s2.recv(1, MSG_OOB) # leave a consumed OOB skb
s1.send(b'y', MSG_OOB)
s2.recv(1, MSG_OOB) # leave a consumed OOB skb
s1.send(b'z', MSG_OOB)
s2.recv(1) # recv 'z' illegally
s2.recv(1, MSG_OOB) # access 'z' skb (use-after-free)
Even though a user reads OOB data, the skb holding the data stays on
the recv queue to mark the OOB boundary and break the next recv().
After the last send() in the scenario above, the sk2's recv queue has
2 leading consumed OOB skbs and 1 real OOB skb.
Then, the following happens during the next recv() without MSG_OOB
1. unix_stream_read_generic() peeks the first consumed OOB skb
2. manage_oob() returns the next consumed OOB skb
3. unix_stream_read_generic() fetches the next not-yet-consumed OOB skb
4. unix_stream_read_generic() reads and frees the OOB skb
, and the last recv(MSG_OOB) triggers KASAN splat.
The 3. above occurs because of the SO_PEEK_OFF code, which does not
expect unix_skb_len(skb) to be 0, but this is true for such consumed
OOB skbs.
while (skip >= unix_skb_len(skb)) {
skip -= unix_skb_len(skb);
skb = skb_peek_next(skb, &sk->sk_receive_queue);
...
}
In addition to this use-after-free, there is another issue that
ioctl(SIOCATMARK) does not function properly with consecutive consumed
OOB skbs.
So, nothing good comes out of such a situation.
Instead of complicating manage_oob(), ioctl() handling, and the next
ECONNRESET fix by introducing a loop for consecutive consumed OOB skbs,
let's not leave such consecutive OOB unnecessarily.
Now, while receiving an OOB skb in unix_stream_recv_urg(), if its
previous skb is a consumed OOB skb, it is freed.
[0]:
BUG: KASAN: slab-use-after-free in unix_stream_read_actor (net/unix/af_unix.c:3027)
Read of size 4 at addr ffff888106ef2904 by task python3/315
CPU: 2 UID: 0 PID: 315 Comm: python3 Not tainted 6.16.0-rc1-00407-gec315832f6f9 #8 PREEMPT(voluntary)
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-4.fc42 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl (lib/dump_stack.c:122)
print_report (mm/kasan/report.c:409 mm/kasan/report.c:521)
kasan_report (mm/kasan/report.c:636)
unix_stream_read_actor (net/unix/af_unix.c:3027)
unix_stream_read_generic (net/unix/af_unix.c:2708 net/unix/af_unix.c:2847)
unix_stream_recvmsg (net/unix/af_unix.c:3048)
sock_recvmsg (net/socket.c:1063 (discriminator 20) net/socket.c:1085 (discriminator 20))
__sys_recvfrom (net/socket.c:2278)
__x64_sys_recvfrom (net/socket.c:2291 (discriminator 1) net/socket.c:2287 (discriminator 1) net/socket.c:2287 (discriminator 1))
do_syscall_64 (arch/x86/entry/syscall_64.c:63 (discriminator 1) arch/x86/entry/syscall_64.c:94 (discriminator 1))
entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130)
RIP: 0033:0x7f8911fcea06
Code: 5d e8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 75 19 83 e2 39 83 fa 08 75 11 e8 26 ff ff ff 66 0f 1f 44 00 00 48 8b 45 10 0f 05 <48> 8b 5d f8 c9 c3 0f 1f 40 00 f3 0f 1e fa 55 48 89 e5 48 83 ec 08
RSP: 002b:00007fffdb0dccb0 EFLAGS: 00000202 ORIG_RAX: 000000000000002d
RAX: ffffffffffffffda RBX: 00007fffdb0dcdc8 RCX: 00007f8911fcea06
RDX: 0000000000000001 RSI: 00007f8911a5e060 RDI: 0000000000000006
RBP: 00007fffdb0dccd0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000202 R12: 00007f89119a7d20
R13: ffffffffc4653600 R14: 0000000000000000 R15: 0000000000000000
</TASK>
Allocated by task 315:
kasan_save_stack (mm/kasan/common.c:48)
kasan_save_track (mm/kasan/common.c:60 (discriminator 1) mm/kasan/common.c:69 (discriminator 1))
__kasan_slab_alloc (mm/kasan/common.c:348)
kmem_cache_alloc_
---truncated---Die Schwachstelle wurde durch Jann Horn publik gemacht. Das Advisory kann von git.kernel.org heruntergeladen werden. Die Verwundbarkeit wird seit dem 16.04.2025 unter CVE-2025-38236 geführt. Das Ausnutzen gilt als leicht. Es sind zwar technische Details, jedoch kein verfügbarer Exploit zur Schwachstelle bekannt. Es muss davon ausgegangen werden, dass ein Exploit zur Zeit etwa USD $0-$5k kostet (Preisberechnung vom 19.12.2025).
Für den Vulnerability Scanner Nessus wurde ein Plugin mit der ID 243500 (Amazon Linux 2023 : bpftool, kernel, kernel-devel (ALAS2023-2025-1111)) herausgegeben, womit die Existenz der Schwachstelle geprüft werden kann.
Ein Upgrade auf die Version 6.1.143, 6.6.96, 6.12.36, 6.15.5 oder 6.16-rc4 vermag dieses Problem zu beheben. Die Schwachstelle lässt sich auch durch das Einspielen des Patches a12237865b48a73183df252029ff5065d73d305e/fad0a2c16062ac7c606b93166a7ce9d265bab976/61a9ad7b69ce688697e5f63332f03e17725353bc/8db4d2d026e6e3649832bfe23b96c4acff0756db/32ca245464e1479bfea8592b9db227fdc1641705 beheben. Dieser kann von git.kernel.org bezogen werden. Als bestmögliche Massnahme wird das Aktualisieren auf eine neue Version empfohlen.
Unter anderem wird der Fehler auch in den Datenbanken von Tenable (243500), EUVD (EUVD-2025-20419) und CERT Bund (WID-SEC-2025-1481) dokumentiert. VulDB is the best source for vulnerability data and more expert information about this specific topic.
Betroffen
- Debian Linux
- Amazon Linux 2
- Ubuntu Linux
- SUSE Linux
- Oracle Linux
- Open Source Linux Kernel
Produkt
Typ
Hersteller
Name
Version
- 6.1.142
- 6.6.0
- 6.6.1
- 6.6.2
- 6.6.3
- 6.6.4
- 6.6.5
- 6.6.6
- 6.6.7
- 6.6.8
- 6.6.9
- 6.6.10
- 6.6.11
- 6.6.12
- 6.6.13
- 6.6.14
- 6.6.15
- 6.6.16
- 6.6.17
- 6.6.18
- 6.6.19
- 6.6.20
- 6.6.21
- 6.6.22
- 6.6.23
- 6.6.24
- 6.6.25
- 6.6.26
- 6.6.27
- 6.6.28
- 6.6.29
- 6.6.30
- 6.6.31
- 6.6.32
- 6.6.33
- 6.6.34
- 6.6.35
- 6.6.36
- 6.6.37
- 6.6.38
- 6.6.39
- 6.6.40
- 6.6.41
- 6.6.42
- 6.6.43
- 6.6.44
- 6.6.45
- 6.6.46
- 6.6.47
- 6.6.48
- 6.6.49
- 6.6.50
- 6.6.51
- 6.6.52
- 6.6.53
- 6.6.54
- 6.6.55
- 6.6.56
- 6.6.57
- 6.6.58
- 6.6.59
- 6.6.60
- 6.6.61
- 6.6.62
- 6.6.63
- 6.6.64
- 6.6.65
- 6.6.66
- 6.6.67
- 6.6.68
- 6.6.69
- 6.6.70
- 6.6.71
- 6.6.72
- 6.6.73
- 6.6.74
- 6.6.75
- 6.6.76
- 6.6.77
- 6.6.78
- 6.6.79
- 6.6.80
- 6.6.81
- 6.6.82
- 6.6.83
- 6.6.84
- 6.6.85
- 6.6.86
- 6.6.87
- 6.6.88
- 6.6.89
- 6.6.90
- 6.6.91
- 6.6.92
- 6.6.93
- 6.6.94
- 6.6.95
- 6.12.0
- 6.12.1
- 6.12.2
- 6.12.3
- 6.12.4
- 6.12.5
- 6.12.6
- 6.12.7
- 6.12.8
- 6.12.9
- 6.12.10
- 6.12.11
- 6.12.12
- 6.12.13
- 6.12.14
- 6.12.15
- 6.12.16
- 6.12.17
- 6.12.18
- 6.12.19
- 6.12.20
- 6.12.21
- 6.12.22
- 6.12.23
- 6.12.24
- 6.12.25
- 6.12.26
- 6.12.27
- 6.12.28
- 6.12.29
- 6.12.30
- 6.12.31
- 6.12.32
- 6.12.33
- 6.12.34
- 6.12.35
- 6.15.0
- 6.15.1
- 6.15.2
- 6.15.3
- 6.15.4
- 6.16-rc1
- 6.16-rc2
- 6.16-rc3
Lizenz
Webseite
- Hersteller: https://www.kernel.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Zuverlässigkeit: 🔍
CVSSv3
VulDB Meta Base Score: 7.9VulDB Meta Temp Score: 7.7
VulDB Base Score: 8.0
VulDB Temp Score: 7.6
VulDB Vector: 🔒
VulDB Zuverlässigkeit: 🔍
NVD Base Score: 7.8
NVD Vector: 🔒
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vektor | Komplexität | Authentisierung | Vertraulichkeit | Integrität | Verfügbarkeit |
|---|---|---|---|---|---|
| freischalten | freischalten | freischalten | freischalten | freischalten | freischalten |
| freischalten | freischalten | freischalten | freischalten | freischalten | freischalten |
| freischalten | freischalten | freischalten | freischalten | freischalten | freischalten |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Zuverlässigkeit: 🔍
Exploiting
Klasse: PufferüberlaufCWE: CWE-416 / CWE-119
CAPEC: 🔒
ATT&CK: 🔒
Physisch: Teilweise
Lokal: Ja
Remote: Teilweise
Verfügbarkeit: 🔒
Status: Nicht definiert
EPSS Score: 🔒
EPSS Percentile: 🔒
Preisentwicklung: 🔍
Aktuelle Preisschätzung: 🔒
| 0-Day | freischalten | freischalten | freischalten | freischalten |
|---|---|---|---|---|
| Heute | freischalten | freischalten | freischalten | freischalten |
Nessus ID: 243500
Nessus Name: Amazon Linux 2023 : bpftool, kernel, kernel-devel (ALAS2023-2025-1111)
Threat Intelligence
Interesse: 🔍Aktive Akteure: 🔍
Aktive APT Gruppen: 🔍
Gegenmassnahmen
Empfehlung: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: Kernel 6.1.143/6.6.96/6.12.36/6.15.5/6.16-rc4
Patch: a12237865b48a73183df252029ff5065d73d305e/fad0a2c16062ac7c606b93166a7ce9d265bab976/61a9ad7b69ce688697e5f63332f03e17725353bc/8db4d2d026e6e3649832bfe23b96c4acff0756db/32ca245464e1479bfea8592b9db227fdc1641705
Timeline
16.04.2025 CVE zugewiesen08.07.2025 Advisory veröffentlicht
08.07.2025 VulDB Eintrag erstellt
19.12.2025 VulDB Eintrag letzte Aktualisierung
Quellen
Hersteller: kernel.orgAdvisory: git.kernel.org
Person: Jann Horn
Status: Bestätigt
CVE: CVE-2025-38236 (🔒)
GCVE (CVE): GCVE-0-2025-38236
GCVE (VulDB): GCVE-100-315312
EUVD: 🔒
CERT Bund: WID-SEC-2025-1481 - Linux Kernel: Mehrere Schwachstellen
Eintrag
Erstellt: 08.07.2025 10:10Aktualisierung: 19.12.2025 07:15
Anpassungen: 08.07.2025 10:10 (61), 05.08.2025 15:20 (2), 09.08.2025 17:43 (1), 09.08.2025 19:05 (1), 29.08.2025 10:33 (7), 28.09.2025 11:58 (1), 19.12.2025 07:15 (12)
Komplett: 🔍
Cache ID: 216::103
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Bisher keine Kommentare. Sprachen: de + en.
Bitte loggen Sie sich ein, um kommentieren zu können.