Skip to content

drbd: Fix potential NULL pointer dereference in _drbd_set_state()#999

Open
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1116254=>linus-master
Open

drbd: Fix potential NULL pointer dereference in _drbd_set_state()#999
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1116254=>linus-master

Conversation

@blktests-ci

@blktests-ci blktests-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown

Pull request for series with
subject: drbd: Fix potential NULL pointer dereference in _drbd_set_state()
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1116254

@blktests-ci

blktests-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown
Author

Upstream branch: bade58e
series: https://patchwork.kernel.org/project/linux-block/list/?series=1116254
version: 1

@blktests-ci

blktests-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown
Author

Upstream branch: 4edcdef
series: https://patchwork.kernel.org/project/linux-block/list/?series=1116254
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1116254=>linus-master branch from 3237660 to e7e473f Compare June 26, 2026 08:33
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 4cc45a3 to 90ffd56 Compare June 29, 2026 17:14
The connection pointer receives a value in the _drbd_set_state()
function, including through a call to the first_peer_device() function.
This function returns a pointer to a list element. If the list is empty, it
returns a NULL pointer, which is later assigned to the connection
pointer. Subsequently, this pointer will be dereferenced.

Add a NULL check for the connection pointer to avoid dereferencing an
invalid pointer.

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

Fixes: a6b32bc ("drbd: Introduce "peer_device" object between "device" and "connection"")
Cc: stable@vger.kernel.org
Signed-off-by: Andrey Vatoropin <a.vatoropin@crpt.ru>
@blktests-ci

blktests-ci Bot commented Jun 29, 2026

Copy link
Copy Markdown
Author

Upstream branch: dc59e4f
series: https://patchwork.kernel.org/project/linux-block/list/?series=1116254
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1116254=>linus-master branch from e7e473f to b0f05b3 Compare June 29, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants