public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 5.10.y 0/3] scsi: Backport fixes for CVE-2021-47182
@ 2024-12-09 17:03 Vasiliy Kovalev
  2024-12-09 17:03 ` [PATCH 5.10.y 1/3] scsi: core: Fix scsi_mode_sense() buffer length handling Vasiliy Kovalev
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Vasiliy Kovalev @ 2024-12-09 17:03 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sasha Levin, stable
  Cc: Martin K . Petersen, James E . J . Bottomley, Damien Le Moal,
	linux-scsi, lvc-project, kovalev, nickel, gerben, dutyrok

The patch titled "scsi: core: Fix scsi_mode_sense() buffer length handling"
addresses CVE-2021-47182, fixing the following issues in `scsi_mode_sense()`
buffer length handling:  

1. Incorrect handling of the allocation length field in the MODE SENSE(10)
   command, causing truncation of buffer lengths larger than 255 bytes.  

2. Memory corruption when handling small buffer lengths due to lack of proper
   validation.  

CVE announcement in linux-cve-announce:  
https://lore.kernel.org/linux-cve-announce/2024041032-CVE-2021-47182-377e@gregkh/  
Fixed versions:  
- Fixed in 5.15.5 with commit e15de347faf4  
- Fixed in 5.16 with commit 17b49bcbf835  

Official CVE entry:  
https://cve.org/CVERecord/?id=CVE-2021-47182

---
v2: To ensure consistency and completeness of the fixes, this backport
includes all 3 patches from the series [1].
In addition to the first patch that addresses the CVE, the second and
third patches are included, which prevent further regressions and align
with the fixes already backported and proposed for backporting [2] to
the stable 5.15 kernel.

[1] https://lore.kernel.org/all/20210820070255.682775-1-damien.lemoal@wdc.com/
[2] https://lore.kernel.org/all/20241209165340.112862-1-kovalev@altlinux.org/

[PATCH 5.10.y 1/3] scsi: core: Fix scsi_mode_sense() buffer length handling
[PATCH 5.10.y 2/3] scsi: core: Fix scsi_mode_select() buffer length handling
[PATCH 5.10.y 3/3] scsi: sd: Fix sd_do_mode_sense() buffer length handling


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-01-30 21:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-09 17:03 [PATCH v2 5.10.y 0/3] scsi: Backport fixes for CVE-2021-47182 Vasiliy Kovalev
2024-12-09 17:03 ` [PATCH 5.10.y 1/3] scsi: core: Fix scsi_mode_sense() buffer length handling Vasiliy Kovalev
2024-12-09 20:55   ` Sasha Levin
2024-12-09 17:03 ` [PATCH 5.10.y 2/3] scsi: core: Fix scsi_mode_select() " Vasiliy Kovalev
2024-12-09 20:55   ` Sasha Levin
2024-12-09 17:03 ` [PATCH 5.10.y 3/3] scsi: sd: Fix sd_do_mode_sense() " Vasiliy Kovalev
2024-12-09 20:55   ` Sasha Levin
2025-01-30 21:26 ` [PATCH v2 5.10.y 0/3] scsi: Backport fixes for CVE-2021-47182 Vasiliy Kovalev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox