android_kernel_xiaomi_sm8350/drivers/block/drbd
Mikhail Lobanov 959974bf5d drbd: Add NULL check for net_conf to prevent dereference in state validation
commit a5e61b50c9f44c5edb6e134ede6fee8806ffafa9 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-08 16:20:33 +01:00
..
drbd_actlog.c
drbd_bitmap.c
drbd_debugfs.c
drbd_debugfs.h
drbd_int.h
drbd_interval.c
drbd_interval.h
drbd_main.c drbd: Fix atomicity violation in drbd_uuid_set_bm() 2024-11-08 16:20:33 +01:00
drbd_nl.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
drbd_nla.c
drbd_nla.h
drbd_proc.c
drbd_protocol.h
drbd_receiver.c drbd: correctly submit flush bio on barrier 2023-05-17 11:36:04 +02:00
drbd_req.c
drbd_req.h
drbd_state.c drbd: Add NULL check for net_conf to prevent dereference in state validation 2024-11-08 16:20:33 +01:00
drbd_state.h
drbd_state_change.h
drbd_strings.c
drbd_strings.h
drbd_vli.h
drbd_worker.c
Kconfig
Makefile