mirror of
https://github.com/LineageOS/android_kernel_samsung_msm8226.git
synced 2026-09-28 00:00:22 +02:00
netfilter: xt_qtaguid: do not look at TCP_TIME_WAIT socket
It is possible that skb->sk may be a TCP_TIME_WAIT socket, in which case many of the fields will not be valid. Thanks to Eric Dumazet <edumazet@google.com> for pointing out this issue and the fix. http://article.gmane.org/gmane.linux.ports.arm.msm/3400 Change-Id: I1fa955df16f8919ec243d55e6131efb335a7871c Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
This commit is contained in:
committed by
Jay Chokshi
parent
fdb639de0e
commit
16e940bc5e
@@ -1773,6 +1773,8 @@ static bool qtaguid_mt(const struct sk_buff *skb, struct xt_action_param *par)
|
||||
}
|
||||
|
||||
sk = skb->sk;
|
||||
if (sk && sk->sk_state == TCP_TIME_WAIT)
|
||||
sk = NULL;
|
||||
if (sk == NULL) {
|
||||
/*
|
||||
* A missing sk->sk_socket happens when packets are in-flight
|
||||
|
||||
Reference in New Issue
Block a user