Commit 67349025 authored by Marco Elver's avatar Marco Elver Committed by Greg Kroah-Hartman
Browse files

net: switch to storing KCOV handle directly in sk_buff

[ Upstream commit fa69ee5a ]

It turns out that usage of skb extensions can cause memory leaks. Ido
Schimmel reported: "[...] there are instances that blindly overwrite
'skb->extensions' by invoking skb_copy_header() after __alloc_skb()."

Therefore, give up on using skb extensions for KCOV handle, and instead
directly store kcov_handle in sk_buff.

Fixes: 6370cc3b ("net: add kcov handle to skb extensions")
Fixes: 85ce50d3 ("net: kcov: don't select SKB_EXTENSIONS when there is no NET")
Fixes: 97f53a08 ("net: linux/skbuff.h: combine SKB_EXTENSIONS + KCOV handling")
Link: https://lore.kernel.org/linux-wireless/20201121160941.GA485907@shredder.lan/


Reported-by: default avatarIdo Schimmel <idosch@idosch.org>
Signed-off-by: default avatarMarco Elver <elver@google.com>
Link: https://lore.kernel.org/r/20201125224840.2014773-1-elver@google.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Stable-dep-of: db0b124f ("igc: Enhance Qbv scheduling by using first flag bit")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 3d5f83a6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment