linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Bring the BusLogic host bus adapter driver up to Y2021
@ 2021-04-20 18:01 Maciej W. Rozycki
  2021-04-20 18:01 ` [PATCH v2 1/5] scsi: BusLogic: Fix missing `pr_cont' use Maciej W. Rozycki
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Maciej W. Rozycki @ 2021-04-20 18:01 UTC (permalink / raw)
  To: Khalid Aziz, James E.J. Bottomley, Martin K. Petersen
  Cc: Christoph Hellwig, linux-scsi, linux-kernel

Hi,

 This is v2 of the series with 2/5 updated to use `vscnprintf' rather than 
`vsnprintf'.  No other changes.

 So we are here owing to Christoph's recent ISA bounce buffering sweep: 
<https://lore.kernel.org/linux-scsi/20210331073001.46776-1-hch@lst.de/T/#m981284e74e93216626a0728ce1601ca18fca92e8> 
which has prompted me to verify the current version of Linux with my old 
server, which has been long equipped with venerable Linux 2.6.18 and which 
I now have available for general experimenting, and the BusLogic BT-958 
PCI SCSI host bus adapter the server has used for 20-something years now.  
This revealed numerous issues with the BusLogic driver.

 Firstly (1/5) it has suffered from some bitrot and messages produced have 
become messy from the lack of update for proper `pr_cont' support.

 Secondly (2/5) there has been a potential buffer overrun/stack corruption 
security issue from using an unbounded `vsprintf' call.

 Thirdly (3/5) it has become obvious the BusLogic driver would have been 
non-functional, should I have upgraded the kernel, at least with this 
configuration for some 8 years now, and the underlying cause has been a 
long-known issue with the MultiMaster firmware I have dealt with already, 
back in 2003.  To put it short the firmware cannot cope with commands that 
request an allocation length exceeding the length of actual data returned.

 I have originally observed it with a LOG SENSE command in the course of 
investigating why smartmontools bring the system to a death, and worked it 
around: <https://sourceforge.net/p/smartmontools/mailman/message/4993087/> 
by issuing the command twice, first just to obtain the allocation length 
required.  As it turns out we need a similar workaround in the kernel now.

 But in the course of investigating this issue I have discovered there is 
a second bottom to it and hence I have prepared follow-up changes (4-5/5) 
to address problems with our handling of Vital Product Data INQUIRY pages.

 See individual change descriptions for further details.

 Questions, comments, concerns?  Otherwise please apply.

  Maciej

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

end of thread, other threads:[~2021-07-08  3:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 18:01 [PATCH v2 0/5] Bring the BusLogic host bus adapter driver up to Y2021 Maciej W. Rozycki
2021-04-20 18:01 ` [PATCH v2 1/5] scsi: BusLogic: Fix missing `pr_cont' use Maciej W. Rozycki
2021-04-21  8:13   ` David Laight
2021-04-21 12:28     ` Maciej W. Rozycki
2021-04-22 17:26   ` Khalid Aziz
2021-04-20 18:01 ` [PATCH v2 2/5] scsi: BusLogic: Avoid unbounded `vsprintf' use Maciej W. Rozycki
2021-04-22 17:30   ` Khalid Aziz
2021-04-20 18:01 ` [PATCH v2 3/5] scsi: Provide for avoiding trailing allocation length with VPD inquiries Maciej W. Rozycki
2021-04-20 18:02 ` [PATCH v2 4/5] scsi: Avoid using reserved length byte " Maciej W. Rozycki
2021-04-20 18:02 ` [PATCH v2 5/5] scsi: Set allocation length to 255 for ATA Information VPD page Maciej W. Rozycki
2021-06-10 23:25 ` [PING][PATCH v2 0/5] Bring the BusLogic host bus adapter driver up to Y2021 Maciej W. Rozycki
2021-06-11  0:53   ` Martin K. Petersen
2021-06-30 10:36     ` Maciej W. Rozycki
2021-07-08  3:33       ` Martin K. Petersen
2021-06-13 23:14   ` Nix

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).