Re: [PATCH] block: initialize integrity buffer to zero before writing it to media

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 06, 2024 at 10:08:20AM -0400, Martin K. Petersen wrote:
> 
> Christoph,
> 
> > 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.
> 
> We do explicitly set the app_tag to 0 for PI so it's only non-PI
> metadata that's affected.

Ah, true.  I could switch to then just zeroing the buffer in
->generate_fn for non-PI metadata only.  That's actually the
first version I prototyped.





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux