diff options
author | Ziyang Xuan <william.xuanziyang@huawei.com> | 2023-04-20 14:40:35 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-04-22 15:10:39 +0200 |
commit | 99e5acae193e369b71217efe6f1dad42f3f18815 (patch) | |
tree | 4828ad5ceece8950a4e12ba57a0667f1d4a2b0d0 /kernel/cpu_pm.c | |
parent | Merge tag 'mlx5-fixes-2023-04-20' of git://git.kernel.org/pub/scm/linux/kerne... (diff) | |
download | linux-99e5acae193e369b71217efe6f1dad42f3f18815.tar.xz linux-99e5acae193e369b71217efe6f1dad42f3f18815.zip |
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 <willemb@google.com>
Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/cpu_pm.c')
0 files changed, 0 insertions, 0 deletions