summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-07-08 22:08:39 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2023-07-08 22:08:39 +0300
commit8fc3b8f082cc2f5faa6eae315b938bc5e79c332e (patch)
treef3cf98ef267e8f27d8a50d81957186c075380869 /drivers/md
parentc206353dfdf026dafd42679cf82d6f0a89781e36 (diff)
parent01f23c5f1526f5b6ff744887aa511b9e69d4401b (diff)
downloadlinux-8fc3b8f082cc2f5faa6eae315b938bc5e79c332e.tar.xz
Merge tag 'hardening-v6.5-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull hardening fixes from Kees Cook: - Check for NULL bdev in LoadPin (Matthias Kaehlcke) - Revert unwanted KUnit FORTIFY build default - Fix 1-element array causing boot warnings with xhci-hub * tag 'hardening-v6.5-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: usb: ch9: Replace bmSublinkSpeedAttr 1-element array with flexible array Revert "fortify: Allow KUnit test to build without FORTIFY" dm: verity-loadpin: Add NULL pointer check for 'bdev' parameter
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-verity-loadpin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/dm-verity-loadpin.c b/drivers/md/dm-verity-loadpin.c
index 4f78cc55c251..0666699b6858 100644
--- a/drivers/md/dm-verity-loadpin.c
+++ b/drivers/md/dm-verity-loadpin.c
@@ -58,6 +58,9 @@ bool dm_verity_loadpin_is_bdev_trusted(struct block_device *bdev)
int srcu_idx;
bool trusted = false;
+ if (bdev == NULL)
+ return false;
+
if (list_empty(&dm_verity_loadpin_trusted_root_digests))
return false;