cbcvebase.
CVE-2025-38147
published 2025-07-03

CVE-2025-38147: In the Linux kernel, the following vulnerability has been resolved: calipso: Don't call calipso functions for AF_INET sk. syzkaller reported a null-ptr-deref…

medium5.5CVSS 3.1
AVLACLPRLUINSUCNINAH
In the Linux kernel, the following vulnerability has been resolved: calipso: Don't call calipso functions for AF_INET sk. syzkaller reported a null-ptr-deref in txopt_get(). [0] The offset 0x70 was of struct ipv6_txoptions in struct ipv6_pinfo, so struct ipv6_pinfo was NULL there. However, this never happens for IPv6 sockets as inet_sk(sk)->pinet6 is always set in inet6_create(), meaning the socket was not IPv6 one. The root cause is missing validation in netlbl_conn_setattr(). netlbl_conn_setattr() switches branches based on struct sockaddr.sa_family, which is passed from userspace. However, netlbl_conn_setattr() does not check if the address family matches the socket. The syzkaller must have called connect() for an IPv6 address on an IPv4 socket. We have a proper validation in tcp_v[46]_connect(), but security_socket_connect() is called in the earlier stage. Let's copy the validation to netlbl_conn_setattr(). [0]: Oops: general protection fault, probably for non-canonical address 0xdffffc000000000e: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000070-0x0000000000000077] CPU: 2 UID: 0 PID: 12928 Comm: syz.9.1677 Not tainted 6.12.0 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 RIP: 0010:txopt_get include/net/ipv6.h:390 [inline] RIP: 0010: Code: 02 00 00 49 8b ac 24 f8 02 00 00 e8 84 69 2a fd e8 ff 00 16 fd 48 8d 7d 70 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 3c 02 00 0f 85 53 02 00 00 48 8b 6d 70 48 85 ed 0f 84 ab 01 00 RSP: 0018:ffff88811b8afc48 EFLAGS: 00010212 RAX: dffffc0000000000 RBX: 1ffff11023715f8a RCX: ffffffff841ab00c RDX: 000000000000000e RSI: ffffc90007d9e000 RDI: 0000000000000070 RBP: 0000000000000000 R08: ffffed1023715f9d R09: ffffed1023715f9e R10: ffffed1023715f9d R11: 0000000000000003 R12: ffff888123075f00 R13: ffff88810245bd80 R14: ffff888113646780 R15: ffff888100578a80 FS: 00007f9019bd7640(0000) GS:ffff8882d2d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 000

Affected

36 ranges· showing 25
VendorProductVersion rangeFixed in
debiandebian_linux
debianlinux< linux 6.1.147-1 (bookworm)linux 6.1.147-1 (bookworm)
debianlinux-6.1< linux 6.1.147-1 (bookworm)linux 6.1.147-1 (bookworm)
linuxlinux
linuxlinux>= ceba1832b1b2da0149c51de62a847c00bca1677a < fc2da88411470480b8b7e9177e930cedd893cf56fc2da88411470480b8b7e9177e930cedd893cf56
linuxlinux>= ceba1832b1b2da0149c51de62a847c00bca1677a < 0c813dbc851dbf418fdc6dc883fd0592d6c555cd0c813dbc851dbf418fdc6dc883fd0592d6c555cd
linuxlinux>= ceba1832b1b2da0149c51de62a847c00bca1677a < 26ce90f1ce60b0ff587de8d6aec399aa55cab28e26ce90f1ce60b0ff587de8d6aec399aa55cab28e
linuxlinux>= ceba1832b1b2da0149c51de62a847c00bca1677a < c32ebe33626335a536dbbdd09571c06dd9bc1729c32ebe33626335a536dbbdd09571c06dd9bc1729
linuxlinux>= ceba1832b1b2da0149c51de62a847c00bca1677a < 946bfdfcb76ac2bac5b8526447035885ff41c598946bfdfcb76ac2bac5b8526447035885ff41c598
linuxlinux>= ceba1832b1b2da0149c51de62a847c00bca1677a < dd8928897594931d6912ef2f7a43e110b4958d3ddd8928897594931d6912ef2f7a43e110b4958d3d
linuxlinux>= ceba1832b1b2da0149c51de62a847c00bca1677a < e2ec310c7a50271843c585e27ef14e48c66ce649e2ec310c7a50271843c585e27ef14e48c66ce649
linuxlinux>= ceba1832b1b2da0149c51de62a847c00bca1677a < 6e9f2df1c550ead7cecb3e450af1105735020c926e9f2df1c550ead7cecb3e450af1105735020c92
linuxlinux_kernel>= 0 < 5.10.244-15.10.244-1
linuxlinux_kernel>= 0 < 6.1.147-16.1.147-1
linuxlinux_kernel>= 0 < 6.12.35-16.12.35-1
linuxlinux_kernel>= 0 < 6.12.35-16.12.35-1
linuxlinux_kernel>= 0 < 5.15.0-156.1665.15.0-156.166
linuxlinux_kernel>= 0 < 6.8.0-100.1006.8.0-100.100
linuxlinux_kernel>= 4.8 < 5.4.2955.4.295
linuxlinux_kernel>= 5.11 < 5.15.1865.15.186
linuxlinux_kernel>= 5.16 < 6.1.1426.1.142
linuxlinux_kernel>= 5.5 < 5.10.2395.10.239
linuxlinux_kernel>= 6.13 < 6.15.36.15.3
linuxlinux_kernel>= 6.2 < 6.6.946.6.94
linuxlinux_kernel>= 6.7 < 6.12.346.12.34

CVSS provenance

nvdv3.15.5MEDIUMCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
osv5.5MEDIUM