Re: [PATCH v4] block/scsi-ioctl: Fix kernel-infoleak in scsi_put_cdrom_generic_arg()

2020-10-02 Thread Jens Axboe
On 10/2/20 8:22 AM, Peilin Ye wrote: > scsi_put_cdrom_generic_arg() is copying uninitialized stack memory to > userspace, since the compiler may leave a 3-byte hole in the middle of > `cgc32`. Fix it by adding a padding field to `struct > compat_cdrom_generic_command`. Applied, thanks. -- Jens

[PATCH v4] block/scsi-ioctl: Fix kernel-infoleak in scsi_put_cdrom_generic_arg()

2020-10-02 Thread Peilin Ye
scsi_put_cdrom_generic_arg() is copying uninitialized stack memory to userspace, since the compiler may leave a 3-byte hole in the middle of `cgc32`. Fix it by adding a padding field to `struct compat_cdrom_generic_command`. Cc: sta...@vger.kernel.org Fixes: f3ee6e63a9df ("compat_ioctl: move