In the Linux kernel, the following vulnerability has been resolved: scsi: mpi3mr: Fix buffer overflow in the BSG target device map The size of the target device map buffer is held in a u16 while the number of devices it is derived from is not bounded to fit. With enough devices the size wraps, a short buffer is allocated, and the loop that fills it writes past the end. Do the calculation in size_t.
https://git.kernel.org/stable/c/fe81812af36bad609d233f11ba989dedcde41ca3
https://git.kernel.org/stable/c/89930d3c26c282526f904118ddbe0d5b5755cb0b
https://git.kernel.org/stable/c/60b25364d7e430c202fb3f1aa24247914d7b1d53
https://git.kernel.org/stable/c/3d858ac76ace4dee07d8d556ff72d7cd3aa3ccd8
https://git.kernel.org/stable/c/203b3072e7aa10d98b3f2b766693ea925cfc571d
https://git.kernel.org/stable/c/18f8301c66da25bbd4efed6ee39d57f31c66b88f