Skip to content
Commit d97af30f authored by Dave Watson's avatar Dave Watson Committed by David S. Miller
Browse files

tcp: fix null ptr deref in getsockopt(..., TCP_ULP, ...)



If icsk_ulp_ops is unset, it dereferences a null ptr.
Add a null ptr check.

BUG: KASAN: null-ptr-deref in copy_to_user include/linux/uaccess.h:168 [inline]
BUG: KASAN: null-ptr-deref in do_tcp_getsockopt.isra.33+0x24f/0x1e30 net/ipv4/tcp.c:3057
Read of size 4 at addr 0000000000000020 by task syz-executor1/15452

Signed-off-by: default avatarDave Watson <davejwatson@fb.com>
Reported-by: default avatar"Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 019b13ae
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment