Florian Westphal 21b27b2baa netfilter: nf_queue: fix possible use-after-free
commit c3873070247d9e3c7a6b0cf9bf9b45e8018427b1 upstream.

Eric Dumazet says:
  The sock_hold() side seems suspect, because there is no guarantee
  that sk_refcnt is not already 0.

On failure, we cannot queue the packet and need to indicate an
error.  The packet will be dropped by the caller.

v2: split skb prefetch hunk into separate change

Fixes: 271b72c7fa82c ("udp: RCU handling for Unicast packets.")
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-08 19:00:57 +01:00
..
2021-06-10 12:42:36 +02:00
2019-03-23 13:19:44 +01:00
2019-02-23 09:05:59 +01:00
2015-11-18 16:17:38 -05:00
2016-06-27 15:06:17 -04:00
2016-07-08 12:20:57 +02:00
2016-04-25 16:44:27 -04:00
2016-04-25 16:44:27 -04:00
2016-06-09 23:41:03 -07:00
2016-08-26 11:55:18 -07:00
2015-09-17 17:18:37 -07:00
2016-09-23 08:38:50 -04:00
2016-02-16 20:21:48 -05:00
2016-05-20 18:03:16 -04:00
2019-11-10 11:23:31 +01:00
2020-07-22 09:10:48 +02:00
2016-10-14 10:59:15 -04:00
2016-05-20 18:03:17 -04:00
2016-08-17 19:36:23 -04:00
2021-08-04 11:58:03 +02:00
2015-10-23 06:26:42 -07:00
2016-10-03 02:00:22 -04:00
2016-10-04 02:11:51 -04:00
2016-06-15 20:41:23 -07:00
2018-05-16 10:08:41 +02:00
2016-03-23 22:09:58 -04:00
2016-04-07 16:53:30 -04:00
2020-05-02 17:23:08 +02:00
2016-05-03 16:08:14 -04:00
2015-10-26 22:24:22 -07:00
2017-07-21 07:42:18 +02:00