aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorZiyang Xuan <[email protected]>2023-04-20 20:40:35 +0800
committerDavid S. Miller <[email protected]>2023-04-22 14:10:39 +0100
commit99e5acae193e369b71217efe6f1dad42f3f18815 (patch)
tree4828ad5ceece8950a4e12ba57a0667f1d4a2b0d0 /lib/test_fortify/write_overflow-strncpy-src.c
parent6e79bd28ab0abd7e82d020d6d1728c3ca543450f (diff)
ipv4: Fix potential uninit variable access bug in __ip_make_skb()
Like commit ea30388baebc ("ipv6: Fix an uninit variable access bug in __ip6_make_skb()"). icmphdr does not in skb linear region under the scenario of SOCK_RAW socket. Access icmp_hdr(skb)->type directly will trigger the uninit variable access bug. Use a local variable icmp_type to carry the correct value in different scenarios. Fixes: 96793b482540 ("[IPV4]: Add ICMPMsgStats MIB (RFC 4293)") Reviewed-by: Willem de Bruijn <[email protected]> Signed-off-by: Ziyang Xuan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions