Files
linux/drivers/scsi
Tom Rix faad6cebde scsi: sr: Do not leak information in ioctl
sr_ioctl.c uses this pattern:

  result = sr_do_ioctl(cd, &cgc);
  to-user = buffer[];
  kfree(buffer);
  return result;

Use of a buffer without checking leaks information. Check result and jump
over the use of buffer if there is an error.

  result = sr_do_ioctl(cd, &cgc);
  if (result)
    goto err;
  to-user = buffer[];
err:
  kfree(buffer);
  return result;

Additionally, initialize the buffer to zero.

This problem can be seen in the 2.4.0 kernel.

Link: https://lore.kernel.org/r/[email protected]
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Tom Rix <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2022-04-18 22:48:31 -04:00
..
2022-04-11 22:09:35 -04:00
2022-04-11 22:09:35 -04:00
…
…
…
…
…
…
…
…
2022-02-22 21:11:02 -05:00
…
…
…
…
…
…
…
2021-10-16 21:45:56 -04:00
2022-02-22 21:11:02 -05:00
2021-04-13 00:20:48 -04:00
…
…
…
2022-01-25 00:09:41 -05:00
…
…
2022-02-22 21:11:02 -05:00
2021-03-24 23:03:43 -04:00
2022-01-22 08:33:37 +02:00
2022-02-02 07:49:59 -07:00
2022-02-22 21:11:08 -05:00
2022-03-08 19:40:00 -07:00
2021-12-22 23:41:13 -05:00
2021-04-13 00:20:48 -04:00
…