2 Commits

Author SHA1 Message Date
David Disseldorp
1bdec140a7 test-tool: add iSCSICHAP.Base64Oversize test
This is very similar to the previous Base64 CHAP test, except we
intentionally inject extra base64 characters into the CHAP_R field.
This should cause login to fail. On LIO this can trigger a buffer
overwrite reported at:
https://lore.kernel.org/target-devel/6a0a00f2.e1ea9722.1dc845.b85e@mx.google.com/

Signed-off-by: David Disseldorp <ddiss@suse.de>
2026-05-22 00:17:18 +10:00
David Disseldorp
311548e860 test-tool: add iSCSICHAP.Base64 test
Some targets such as LIO support base64 encoded CHAP_R values. Test this
by intercepting hex-encoded CHAP_R responses and converting the value to
base64.
This will fail on targets which don't support base64; we should probably
skip the test instead.
base64 encoding is performed using the gnutls_base64_encode2() function,
so the test is only present for gnutls-enabled builds.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2026-05-21 21:53:43 +10:00