Christoph Hellwig
129f95948a
block: initialize integrity buffer to zero before writing it to media
...
commit 899ee2c3829c5ac14bfc7d3c4a5846c0b709b78f upstream.
Metadata added by bio_integrity_prep is using plain kmalloc, which leads
to random kernel memory being written media. For PI metadata this is
limited to the app tag that isn't used by kernel generated metadata,
but for non-PI metadata the entire buffer leaks kernel memory.
Fix this by adding the __GFP_ZERO flag to allocations for writes.
Fixes: 7ba1ba12ee ("block: Block layer data integrity support")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20240613084839.1044015-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Shivani Agarwal <shivani.agarwal@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-09-12 11:03:50 +02:00
..
partitions
block/partition: fix signedness issue for Amiga partitions
2023-07-27 08:37:29 +02:00
badblocks.c
bfq-cgroup.c
block, bfq: fix null pointer dereference in bfq_bio_bfqg()
2022-12-08 11:22:57 +01:00
bfq-iosched.c
block, bfq: protect 'bfqd->queued' by 'bfqd->lock'
2022-11-10 17:57:54 +01:00
bfq-iosched.h
bfq: Get rid of __bio_blkcg() usage
2022-06-14 18:11:50 +02:00
bfq-wf2q.c
bio-integrity.c
block: initialize integrity buffer to zero before writing it to media
2024-09-12 11:03:50 +02:00
bio.c
block: prevent an integer overflow in bvec_try_merge_hw_page
2024-02-23 08:24:59 +01:00
blk-cgroup.c
blk-cgroup: fix missing pd_online_fn() while activating policy
2023-02-06 07:52:48 +01:00
blk-core.c
block: fix and cleanup bio_check_ro
2023-02-06 07:52:47 +01:00
blk-exec.c
blk-flush.c
block: Fix fsync always failed if once failed
2022-03-08 19:07:47 +01:00
blk-integrity.c
blk-ioc.c
blk-iocost.c
block/blk-iocost (gcc13): keep large values in a new enum
2023-06-14 10:59:54 +02:00
blk-iolatency.c
blk-iolatency: Fix inflight count imbalances and IO hangs on offline
2022-06-14 18:11:49 +02:00
blk-lib.c
blk-map.c
blk-merge.c
treewide: Remove uninitialized_var() usage
2023-06-09 10:29:01 +02:00
blk-mq-cpumap.c
blk-mq-debugfs-zoned.c
blk-mq-debugfs.c
blk-mq: don't create hctx debugfs dir until q->debugfs_dir is created
2022-08-25 11:17:36 +02:00
blk-mq-debugfs.h
blk-mq-pci.c
blk-mq-rdma.c
blk-mq-sched.c
blk-mq: correct stale comment of .get_budget
2023-03-11 16:43:34 +01:00
blk-mq-sched.h
blk-mq-sysfs.c
blk-mq: fix possible memleak when register 'hctx' failed
2023-01-18 11:41:38 +01:00
blk-mq-tag.c
blk-mq-tag.h
blk-mq-virtio.c
blk-mq.c
blk-mq: fix IO hang from sbitmap wakeup race
2024-02-23 08:25:03 +01:00
blk-mq.h
blk-pm.c
blk-pm.h
blk-rq-qos.c
blk-rq-qos.h
blk-settings.c
blk-softirq.c
blk-stat.c
block: prevent division by zero in blk_rq_stat_sum()
2024-04-13 12:51:38 +02:00
blk-stat.h
blk-sysfs.c
block: don't delete queue kobject before its children
2022-04-15 14:18:05 +02:00
blk-throttle.c
blk-throttle: fix lockdep warning of "cgroup_mutex or RCU read lock required!"
2023-12-20 15:41:20 +01:00
blk-timeout.c
blk-wbt.c
blk-wbt.h
blk-zoned.c
blk.h
bounce.c
bsg-lib.c
bsg.c
cmdline-parser.c
compat_ioctl.c
block/compat_ioctl: fix range check in BLKGETSIZE
2022-04-27 13:50:50 +02:00
elevator.c
block: return ELEVATOR_DISCARD_MERGE if possible
2022-05-25 09:14:38 +02:00
genhd.c
ioctl.c
ioprio.c
block: fix ioprio_get(IOPRIO_WHO_PGRP) vs setuid(2)
2021-12-14 14:49:02 +01:00
Kconfig
Kconfig.iosched
kyber-iosched.c
Makefile
mq-deadline.c
block: return ELEVATOR_DISCARD_MERGE if possible
2022-05-25 09:14:38 +02:00
opal_proto.h
block: sed-opal: handle empty atoms when parsing response
2024-03-26 18:22:12 -04:00
partition-generic.c
block: unhash blkdev part inode when the part is deleted
2022-12-19 12:24:16 +01:00
scsi_ioctl.c
sed-opal.c
block: sed-opal: handle empty atoms when parsing response
2024-03-26 18:22:12 -04:00
t10-pi.c