Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] scsi: target: fix CHAP_N handling
@ 2026-06-02 11:43 David Disseldorp
  2026-06-02 11:43 ` [PATCH 1/2] scsi: target: add extract_param_str() helper David Disseldorp
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: David Disseldorp @ 2026-06-02 11:43 UTC (permalink / raw)
  To: target-devel; +Cc: linux-scsi

The sashiko bot pointed out issues with CHAP_N handling recently, when
reviewing a patch for a separate issue:
https://sashiko.dev/#/patchset/20260521151121.808477-1-hossu.alexandru%40gmail.com
  Since extract_param() unconditionally strips '0x' or '0b' prefixes and
  alters the returned type, wouldn't a valid user with a name like '0xalice' or
  '0bob' have their username mutated to 'alice' or 'ob'?

I believe this behaviour is contrary to the iSCSI spec. I added some simple
libiscsi tests to cover prefix stripping:
https://github.com/sahlberg/libiscsi/pull/472

These patches attempt to fix CHAP_N handling.

----------------------------------------------------------------
David Disseldorp (2):
      scsi: target: add extract_param_str() helper
      scsi: target: fix auth when CHAP_N carries a hex/b64 prefix

 drivers/target/iscsi/iscsi_target_auth.c |  8 ++---
 drivers/target/iscsi/iscsi_target_nego.c | 37 ++++++++++++++++++++++++
 drivers/target/iscsi/iscsi_target_nego.h |  1 +
 3 files changed, 40 insertions(+), 6 deletions(-)


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

end of thread, other threads:[~2026-06-03 16:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02 11:43 [PATCH 0/2] scsi: target: fix CHAP_N handling David Disseldorp
2026-06-02 11:43 ` [PATCH 1/2] scsi: target: add extract_param_str() helper David Disseldorp
2026-06-03 16:30   ` Lee Duncan
2026-06-02 11:43 ` [PATCH 2/2] scsi: target: fix auth when CHAP_N carries a hex/b64 prefix David Disseldorp
2026-06-03 16:30   ` Lee Duncan
2026-06-02 16:42 ` [PATCH 0/2] scsi: target: fix CHAP_N handling John Garry
2026-06-02 23:19   ` David Disseldorp
2026-06-03  8:24     ` John Garry

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