Skip to content

scsi: Replace {v}snprintf() variants with safer alternatives

Lee Jones linux-hardening linux-scsi lkml tools 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 23 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10scsi: 3w-xxxx: Trivial: Remove trailing whitespacedrivers/scsi/3w-xxxx.c+1 -11 reply
2/10scsi: 53c700: Trivial: Remove trailing whitespacedrivers/scsi/53c700.c+51 -511 reply
3/10scsi: NCR5380: Replace snprintf() with the safer scnprintf() variantdrivers/scsi/NCR5380.c+8 -810 replies
4/10scsi: aacraid: linit: Remove snprintf() from sysfs call-backs and replace with sysfs_emit()drivers/scsi/aacraid/linit.c+14 -201 reply
5/10scsi: aacraid: linit: Replace snprintf() with the safer scnprintf() variantdrivers/scsi/aacraid/linit.c+3 -31 reply
6/10scsi: aha1542: Replace snprintf() with the safer scnprintf() variantdrivers/scsi/aha1542.c+1 -11 reply
7/10scsi: aic7xxx: aicasm: Trivial: Remove trailing whitespacedrivers/scsi/aic7xxx/aicasm/aicasm.c+7 -71 reply
8/10scsi: aic7xxx: aicasm: Replace snprintf() with the safer scnprintf() variantdrivers/scsi/aic7xxx/aicasm/aicasm.c+1 -11 reply
9/10scsi: aic94xx: Remove snprintf() from sysfs call-backs and replace with sysfs_emit()drivers/scsi/aic94xx/aic94xx_init.c+5 -61 reply
10/10scsi: arcmsr: Remove snprintf() from sysfs call-backs and replace with sysfs_emit()drivers/scsi/arcmsr/arcmsr_attr.c+10 -301 reply

Reviews trailers per patch

9 of 10 patches have a Reviewed-by or Acked-by.

PatchKees Cook
1/10R-b
2/10R-b
3/10R-b
4/10R-b
5/10
6/10R-b
7/10R-b
8/10R-b
9/10R-b
10/10R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/10] scsi: Replace {v}snprintf() variants with safer alternatives

Note: We're also taking the time to obay our new .editorconfig overlord!

For a far better description of the problem than I could author, see Jon's write-up on LWN [1] and/or Alex's on the Kernel Self Protection Project [1].

[0] https://lwn.net/Articles/69419/
[1] https://github.com/KSPP/linux/issues/105

Lee Jones (10):
scsi: 3w-xxxx: Trivial: Remove trailing whitespace
scsi: 53c700: Trivial: Remove trailing whitespace
scsi: NCR5380: Replace snprintf() with the safer scnprintf() variant
scsi: aacraid: linit: Remove snprintf() from sysfs call-backs and
replace with sysfs_emit()
scsi: aacraid: linit: Replace snprintf() with the safer scnprintf()
variant
scsi: aha1542: Replace snprintf() with the safer scnprintf() variant
scsi: aic7xxx: aicasm: Trivial: Remove trailing whitespace
scsi: aic7xxx: aicasm: Replace snprintf() with the safer scnprintf()
variant
scsi: aic94xx: Remove snprintf() from sysfs call-backs and replace
with sysfs_emit()
scsi: arcmsr: Remove snprintf() from sysfs call-backs and replace with
sysfs_emit()

 drivers/scsi/3w-xxxx.c               |   2 +-
 drivers/scsi/53c700.c                | 102 +++++++++++++--------------
 drivers/scsi/NCR5380.c               |  16 ++---
 drivers/scsi/aacraid/linit.c         |  40 +++++------
 drivers/scsi/aha1542.c               |   2 +-
 drivers/scsi/aic7xxx/aicasm/aicasm.c |  16 ++---
 drivers/scsi/aic94xx/aic94xx_init.c  |  11 ++-
 drivers/scsi/arcmsr/arcmsr_attr.c    |  40 +++--------
 8 files changed, 101 insertions(+), 128 deletions(-)
Cc Adam Radford <[email protected]>
Cc Adaptec OEM Raid Solutions <[email protected]>
Cc Andre Hedrick <[email protected]>
Cc de Melo <[email protected]>
Cc Finn Thain <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc Joel Jacobson <[email protected]>
Cc John Garry <[email protected]>
Cc Lee Jones <[email protected]>
Cc Luben Tuikov <[email protected]>
Cc "Martin K. Petersen" <[email protected]>
Cc Michael Schmitz <[email protected]>
Cc "PMC-Sierra, Inc" <[email protected]>
Cc Richard Hirst <[email protected]>
Cc Tnx to <[email protected]>
Signature · 1 line
2.43.0.594.gd9cf4e227d-goog