王贇
733c99ee8b
net: fix NULL pointer reference in cipso_v4_doi_free
...
In netlbl_cipsov4_add_std() when 'doi_def->map.std' alloc
failed, we sometime observe panic:
BUG: kernel NULL pointer dereference, address:
...
RIP: 0010:cipso_v4_doi_free+0x3a/0x80
...
Call Trace:
netlbl_cipsov4_add_std+0xf4/0x8c0
netlbl_cipsov4_add+0x13f/0x1b0
genl_family_rcv_msg_doit.isra.15+0x132/0x170
genl_rcv_msg+0x125/0x240
This is because in cipso_v4_doi_free() there is no check
on 'doi_def->map.std' when 'doi_def->type' equal 1, which
is possibe, since netlbl_cipsov4_add_std() haven't initialize
it before alloc 'doi_def->map.std'.
This patch just add the check to prevent panic happen for similar
cases.
Reported-by: Abaci <abaci@linux.alibaba.com>
Signed-off-by: Michael Wang <yun.wang@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-26 12:20:47 +01:00
..
2020-08-10 12:06:44 -07:00
2021-05-29 01:04:53 +02:00
2021-06-18 19:47:02 -07:00
2021-06-30 15:51:09 -07:00
2020-11-13 14:24:39 -08:00
2021-05-11 23:23:07 +02:00
2021-08-26 12:20:47 +01:00
2019-11-01 14:57:52 -07:00
2021-06-18 19:47:02 -07:00
2021-06-09 09:38:52 +02:00
2021-06-30 15:51:09 -07:00
2021-07-13 09:28:29 -07:00
2021-06-07 14:08:30 -07:00
2019-10-04 11:10:56 -07:00
2020-07-28 17:42:31 -07:00
2021-05-17 19:29:10 -05:00
2021-02-08 16:47:03 -08:00
2020-10-02 19:11:11 -07:00
2021-05-17 15:29:35 -07:00
2021-01-29 20:39:14 -08:00
2021-06-28 14:29:45 -07:00
2021-08-11 15:54:10 -07:00
2021-06-23 12:56:08 -07:00
2021-07-13 09:28:29 -07:00
2020-12-12 15:08:54 -08:00
2021-06-15 18:01:05 +02:00
2020-08-19 14:06:36 +02:00
2021-03-01 13:32:12 -08:00
2019-09-20 18:23:33 -07:00
2019-08-08 15:55:10 -07:00
2021-08-22 21:24:40 +01:00
2021-02-03 14:51:39 -08:00
2020-08-25 06:28:02 -07:00
2021-06-24 11:17:21 -07:00
2020-08-25 06:23:59 -07:00
2021-01-08 19:25:35 -08:00
2021-07-23 16:38:57 +01:00
2021-05-17 19:29:10 -05:00
2021-06-30 15:51:09 -07:00
2021-06-02 13:27:03 -07:00
2021-06-28 12:44:17 -07:00
2019-10-04 11:10:56 -07:00
2021-07-07 20:52:25 -07:00
2020-08-18 16:02:16 -07:00
2021-02-26 12:28:03 -08:00
2020-11-16 08:08:54 -08:00
2021-04-18 22:04:16 +02:00
2019-05-21 10:50:45 +02:00
2021-04-19 15:20:34 -07:00
2021-06-29 11:28:21 -07:00
2021-06-23 12:56:08 -07:00
2021-05-17 15:29:35 -07:00
2021-07-13 09:28:29 -07:00
2021-06-29 11:28:21 -07:00
2021-08-26 10:20:34 +01:00
2020-12-16 11:01:04 -08:00
2021-06-15 18:01:05 +02:00
2021-08-11 15:00:15 -07:00
2020-03-16 18:26:54 -07:00
2021-07-15 19:54:22 +02:00
2019-05-21 10:50:45 +02:00
2021-05-04 11:58:28 -07:00
2021-03-26 20:41:51 -07:00
2019-05-30 11:26:32 -07:00
2018-10-10 22:26:00 -07:00
2020-02-27 18:50:19 -08:00
2021-07-21 22:50:31 -07:00
2020-07-06 13:23:03 -07:00
2020-07-06 13:23:03 -07:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2021-07-09 18:38:53 -07:00
2021-07-21 22:50:31 -07:00
2021-03-28 17:31:13 -07:00
2020-12-14 16:40:27 -08:00
2021-06-23 12:56:08 -07:00
2019-05-21 10:50:45 +02:00
2021-08-02 10:20:56 +01:00
2021-07-08 12:27:08 -07:00
2019-05-21 10:50:45 +02:00
2021-01-23 21:33:01 -08:00
2020-08-24 17:31:20 -07:00
2021-06-29 11:28:21 -07:00
2020-03-09 22:34:58 +01:00
2020-10-13 17:11:52 -07:00
2017-11-02 11:10:55 +01:00
2020-07-06 13:23:03 -07:00
2019-05-21 10:50:45 +02:00
2021-06-29 11:54:36 -07:00
2021-07-09 11:25:24 -07:00
2021-05-17 15:29:35 -07:00
2021-07-15 19:54:36 +02:00
2021-07-13 09:28:29 -07:00
2020-07-24 15:41:54 -07:00
2021-08-02 10:20:56 +01:00
2021-01-07 12:53:29 -08:00
2020-09-28 12:50:12 -07:00
2020-07-10 13:54:00 -07:00
2021-07-21 08:49:31 -07:00
2021-05-17 15:29:35 -07:00
2020-05-06 09:40:08 +02:00
2020-05-11 15:12:27 +02:00
2019-12-24 22:28:54 -08:00
2021-05-17 15:29:35 -07:00
2020-05-06 09:40:08 +02:00
2021-06-09 09:38:52 +02:00