]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drbd: don't leak the shared secret to unprivileged netlink dumps
authorChristoph Böhmwalder <christoph.boehmwalder@linbit.com>
Fri, 14 Aug 2026 15:16:17 +0000 (17:16 +0200)
committerJens Axboe <axboe@kernel.dk>
Sun, 16 Aug 2026 02:00:10 +0000 (20:00 -0600)
commitc71bf113dfdf426bdaf106636f573ef87b6613a0
treec785ed2ff6057c06adb5eba5c252c0ac3a37a3a3
parent7f40b346462f563a0d6e841a77b5163d2a882a04
drbd: don't leak the shared secret to unprivileged netlink dumps

The conversion to explicit netlink serialization dropped the
exclude_sensitive parameter from net_conf_to_skb(), so each caller has
to sanitize by hand. Two dump paths were missed:
drbd_nl_get_connections_dumpit() and the volume-less connection branch
of get_one_status(). Neither op carries GENL_ADMIN_PERM, so any
unprivileged local user could read the CRAM-HMAC secret.

Add a net_conf_to_skb_sanitized() wrapper and route all three callers
through it.

Fixes: 8098eeb693c4 ("drbd: replace genl_magic with explicit netlink serialization")
Reported-by: Vivek Parikh <vivek.parikh@breachx.ai>
Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
Link: https://patch.msgid.link/20260814151617.73752-1-christoph.boehmwalder@linbit.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/drbd/drbd_nl.c