calipso: Don't call calipso functions for AF_INET sk.
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ ceba1832b1b2da0149c51de62a847c00bca1677a · < dd8928897594931d6912ef2f7a43e110b4958d3d| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s network-labeling code does not check whether a user-supplied address family matches the socket. A local process calling connect() with an IPv6 address on an IPv4 socket can trigger a null-pointer dereference before the normal connection checks run.
Engineers running Linux kernels with the affected network-labeling code should check their kernel version against the vendor advisory; affected versions are not specified in the input.