]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net/tls: avoid NULL pointer deref on nskb->sk in fallback
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 29 Apr 2019 19:19:12 +0000 (12:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 May 2019 15:37:56 +0000 (11:37 -0400)
commit2dcb003314032c6efb13a065ffae60d164b2dd35
treeb64c7ba4758ecae0346158cf8b828c222ead460a
parent15d55bae4e3c43cd9f87fd93c73a263e172d34e1
net/tls: avoid NULL pointer deref on nskb->sk in fallback

update_chksum() accesses nskb->sk before it has been set
by complete_skb(), move the init up.

Fixes: e8f69799810c ("net/tls: Add generic NIC offload infrastructure")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_device_fallback.c