linux/drivers/block/drbd
Mikhail Lobanov a5e61b50c9 drbd: Add NULL check for net_conf to prevent dereference in state validation
If the net_conf pointer is NULL and the code attempts to access its
fields without a check, it will lead to a null pointer dereference.
Add a NULL check before dereferencing the pointer.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 44ed167da7 ("drbd: rcu_read_lock() and rcu_dereference() for tconn->net_conf")
Cc: stable@vger.kernel.org
Signed-off-by: Mikhail Lobanov <m.lobanov@rosalinux.ru>
Link: https://lore.kernel.org/r/20240909133740.84297-1-m.lobanov@rosalinux.ru
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-09-10 13:44:06 -06:00
..
drbd_actlog.c drbd: actlog: fix kernel-doc warnings and spelling 2023-12-22 07:18:35 -07:00
drbd_bitmap.c drbd: use __bio_add_page to add page to bio 2023-05-31 09:50:02 -06:00
drbd_buildtag.c drbd: split off drbd_config into separate file 2023-01-29 15:18:33 -07:00
drbd_debugfs.c drbd: drop API_VERSION define 2023-01-29 15:18:33 -07:00
drbd_debugfs.h drbd: use consistent license 2022-11-22 19:38:39 -07:00
drbd_int.h drbd: Remove an unused field in struct drbd_device 2024-08-26 07:15:53 -06:00
drbd_interval.c drbd: drbd_insert_interval(): Clarify comment 2023-01-29 15:18:33 -07:00
drbd_interval.h drbd: use consistent license 2022-11-22 19:38:39 -07:00
drbd_main.c drbd: use sendpages_ok() instead of sendpage_ok() 2024-07-28 16:47:52 -06:00
drbd_nl.c for-6.9/block-20240310 2024-03-11 11:43:44 -07:00
drbd_nla.c drbd: use consistent license 2022-11-22 19:38:39 -07:00
drbd_nla.h drbd: use consistent license 2022-11-22 19:38:39 -07:00
drbd_polymorph_printk.h drbd: add context parameter to expect() macro 2022-12-01 11:33:49 -07:00
drbd_proc.c drbd: drop API_VERSION define 2023-01-29 15:18:33 -07:00
drbd_protocol.h drbd: use consistent license 2022-11-22 19:38:39 -07:00
drbd_receiver.c drbd: stop defining __KERNEL_SYSCALLS__ 2023-06-05 10:45:25 -06:00
drbd_req.c drbd: Pass a peer device to the resync and online verify functions 2023-04-01 20:27:55 -06:00
drbd_req.h drbd: pass drbd_peer_device to __req_mod 2023-04-01 20:27:55 -06:00
drbd_state_change.h drbd: fix function cast warnings in state machine 2024-02-13 08:55:40 -07:00
drbd_state.c drbd: Add NULL check for net_conf to prevent dereference in state validation 2024-09-10 13:44:06 -06:00
drbd_state.h drbd: use consistent license 2022-11-22 19:38:39 -07:00
drbd_strings.c drbd: use consistent license 2022-11-22 19:38:39 -07:00
drbd_strings.h drbd: use consistent license 2022-11-22 19:38:39 -07:00
drbd_vli.h drbd: remove unnecessary assignment in vli_encode_bits 2023-01-29 15:18:33 -07:00
drbd_worker.c drbd: Pass a peer device to the resync and online verify functions 2023-04-01 20:27:55 -06:00
Kconfig drbd: use consistent license 2022-11-22 19:38:39 -07:00
Makefile drbd: split off drbd_buildtag into separate file 2023-01-29 15:18:33 -07:00