Kyle Zeng
0113d9c9d1
ipv4: fix null-deref in ipv4_link_failure
...
Currently, we assume the skb is associated with a device before calling
__ip_options_compile, which is not always the case if it is re-routed by
ipvs.
When skb->dev is NULL, dev_net(skb->dev) will become null-dereference.
This patch adds a check for the edge case and switch to use the net_device
from the rtable when skb->dev is NULL.
Fixes: ed0de45a1008 ("ipv4: recompile ip options in ipv4_link_failure")
Suggested-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Kyle Zeng <zengyhkyle@gmail.com>
Cc: Stephen Suryaputra <ssuryaextr@gmail.com>
Cc: Vadim Fedorenko <vfedorenko@novek.ru>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-09-17 15:14:58 +01:00
..
2023-05-31 13:06:57 +02:00
2023-08-16 11:09:17 +01:00
2023-08-24 10:51:39 -07:00
2023-02-13 18:35:15 +08:00
2023-03-15 00:37:32 -07:00
2023-07-18 17:31:10 -07:00
2023-08-16 11:09:17 +01:00
2023-08-20 11:40:49 +01:00
2023-09-08 08:02:17 +01:00
2023-06-22 18:40:38 -07:00
2023-07-19 11:03:03 +01:00
2023-03-16 17:26:31 -07:00
2022-02-17 11:44:20 -08:00
2021-09-28 17:32:56 -07:00
2022-04-30 15:12:58 +01:00
2023-08-31 11:58:18 +02:00
2023-08-31 11:58:18 +02:00
2023-04-12 16:40:39 -07:00
2023-04-12 16:40:39 -07:00
2023-05-26 10:30:14 +01:00
2023-05-26 10:30:14 +01:00
2021-05-17 15:29:35 -07:00
2023-06-10 00:11:41 -07:00
2023-03-31 21:37:06 -07:00
2023-09-05 17:49:40 +01:00
2023-07-20 12:34:18 -07:00
2023-08-16 11:09:18 +01:00
2022-10-31 20:14:27 -07:00
2023-09-13 07:18:04 +01:00
2023-08-16 11:09:17 +01:00
2022-07-08 12:10:33 +01:00
2023-08-30 09:44:09 +01:00
2023-08-15 15:26:18 -07:00
2023-07-19 12:27:09 +01:00
2023-09-01 08:11:51 +01:00
2022-01-29 17:53:07 +00:00
2023-09-01 07:27:33 +01:00
2023-09-01 07:27:33 +01:00
2023-08-04 18:24:52 -07:00
2023-04-13 16:43:38 -07:00
2023-07-11 11:06:08 +02:00
2022-09-29 07:18:00 +02:00
2023-05-22 11:17:55 +01:00
2023-04-12 16:40:39 -07:00
2022-06-24 11:34:38 +01:00
2023-08-30 09:44:09 +01:00
2022-11-16 13:02:04 +00:00
2023-04-12 16:40:39 -07:00
2023-01-23 21:37:25 -08:00
2022-05-16 13:03:29 +02:00
2019-05-21 10:50:45 +02:00
2023-08-15 18:54:53 -07:00
2023-08-16 11:09:17 +01:00
2023-01-26 10:52:18 +01:00
2021-05-17 15:29:35 -07:00
2023-04-06 12:01:20 -07:00
2023-08-16 11:09:17 +01:00
2023-09-17 15:14:58 +01:00
2023-06-06 21:13:03 -07:00
2023-08-15 15:26:18 -07:00
2023-02-02 00:25:14 +01:00
2022-04-06 12:05:41 -07:00
2023-06-24 15:50:13 -07:00
2022-10-16 15:27:07 -07:00
2023-03-22 22:53:00 -07:00
2023-02-02 00:25:14 +01:00
2023-02-02 00:25:14 +01:00
2022-09-20 10:21:49 -07:00
2023-08-16 11:09:18 +01:00
2022-04-06 12:05:41 -07:00
2022-04-06 12:05:41 -07:00
2022-04-06 12:05:41 -07:00
2022-04-06 12:05:41 -07:00
2023-08-16 11:09:17 +01:00
2023-08-24 10:51:39 -07:00
2022-04-06 12:05:41 -07:00
2023-08-04 15:33:39 -07:00
2023-08-16 11:09:17 +01:00
2022-04-06 12:05:41 -07:00
2023-06-10 00:11:41 -07:00
2023-09-01 07:27:33 +01:00
2022-12-20 03:13:45 +01:00
2022-04-28 13:02:01 -07:00
2023-03-18 12:23:34 +00:00
2022-04-06 12:05:41 -07:00
2023-08-18 12:44:56 -07:00
2023-01-19 09:26:16 -08:00
2022-04-06 12:05:41 -07:00
2022-04-06 12:05:41 -07:00
2022-04-06 12:05:41 -07:00
2022-04-06 12:05:41 -07:00
2023-09-07 18:33:07 -07:00
2021-05-17 15:29:35 -07:00
2023-03-03 17:25:15 +01:00
2022-11-16 09:43:35 +00:00
2023-06-24 15:50:13 -07:00
2023-07-29 17:10:27 +01:00
2023-08-16 11:09:17 +01:00
2022-11-29 08:44:24 -08:00
2020-07-10 13:54:00 -07:00
2023-09-01 07:27:33 +01:00
2023-06-24 15:50:13 -07:00
2023-06-09 08:16:34 +02:00
2020-05-11 15:12:27 +02:00
2023-08-29 17:39:15 -07:00
2022-06-08 10:10:13 -07:00
2020-05-06 09:40:08 +02:00
2022-09-29 07:18:00 +02:00