summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-07-08 21:08:39 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2023-07-08 21:08:39 +0200
commit8fc3b8f082cc2f5faa6eae315b938bc5e79c332e (patch)
treef3cf98ef267e8f27d8a50d81957186c075380869 /drivers/md
parentMerge tag 'perf-tools-for-v6.5-2-2023-07-06' of git://git.kernel.org/pub/scm/... (diff)
parentusb: ch9: Replace bmSublinkSpeedAttr 1-element array with flexible array (diff)
downloadlinux-8fc3b8f082cc2f5faa6eae315b938bc5e79c332e.tar.xz
linux-8fc3b8f082cc2f5faa6eae315b938bc5e79c332e.zip
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;