]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipv6: Fix potential uninit-value access in __ip6_make_skb()
authorShigeru Yoshida <syoshida@redhat.com>
Tue, 23 Dec 2025 18:53:41 +0000 (00:23 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:12:01 +0000 (13:12 +0100)
commit59d74c843ebf46264c7903726cf6f2673a93b07a
tree7e7fc2ac8c2c34c146f48d7745aaddabf33255b3
parentabf2df229b6a9172cc1827749c1a446d28e00a2e
ipv6: Fix potential uninit-value access in __ip6_make_skb()

commit 4e13d3a9c25b7080f8a619f961e943fe08c2672c upstream.

As it was done in commit fc1092f51567 ("ipv4: Fix uninit-value access in
__ip_make_skb()") for IPv4, check FLOWI_FLAG_KNOWN_NH on fl6->flowi6_flags
instead of testing HDRINCL on the socket to avoid a race condition which
causes uninit-value access.

Fixes: ea30388baebc ("ipv6: Fix an uninit variable access bug in __ip6_make_skb()")
Signed-off-by: Shigeru Yoshida <syoshida@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Referred stable v6.1.y version of the patch to generate this one
link: https://github.com/gregkh/linux/commit/a05c1ede50e9656f0752e523c7b54f3a3489e9a8
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/ip6_output.c