scsi: target: fix CHAP_N handling
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | scsi: target: add extract_param_str() helperdrivers/ drivers/ | +38 | 1 reply | |
| 2/2 | scsi: target: fix auth when CHAP_N carries a hex/b64 prefixdrivers/ | +2 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | John Garry | Lee Duncan |
|---|---|---|
| Series | R-b | |
| 1/2 | R-b | |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] scsi: target: fix CHAP_N handling
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(-)