Re: [PATCH v3] scsi: use unsigned int variables to parse partition table

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

 



Xiaosen,

> signed integer overflow happened in the following multiplication,
> ext_cyl*(end_head+1)*end_sector = 0x41040*(0xff+1)*0x3f = 0xffffc000,
> the overflow was caught by UBSAN and caused crash to the system,
> use unsigned int instead of signed int to avoid integer overflow.

This patch is against a very old kernel. Please see commit a10183d744fb
("scsi: simplify scsi_partsize") which was merged back in 2020.

-- 
Martin K. Petersen	Oracle Linux Engineering




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux