All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Disseldorp <ddiss@suse.de>
To: target-devel@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH 0/2] scsi: target: fix CHAP_N handling
Date: Tue,  2 Jun 2026 21:43:56 +1000	[thread overview]
Message-ID: <20260602115840.26490-1-ddiss@suse.de> (raw)

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(-)


             reply	other threads:[~2026-06-02 11:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-02 11:43 David Disseldorp [this message]
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
2026-07-01 18:31       ` David Disseldorp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260602115840.26490-1-ddiss@suse.de \
    --to=ddiss@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.