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>
This commit is contained in:
David Disseldorp
2026-05-22 00:17:18 +10:00
parent 311548e860
commit 1bdec140a7
3 changed files with 93 additions and 0 deletions

View File

@@ -589,6 +589,7 @@ static CU_TestInfo tests_iscsi_chap[] = {
{ "Invalid", test_iscsi_chap_invalid },
#ifdef HAVE_LIBGNUTLS
{ "Base64", test_iscsi_chap_base64 },
{ "Base64Oversize", test_iscsi_chap_base64_oversize },
#endif
CU_TEST_INFO_NULL
};