• Chuck Lever's avatar
    SUNRPC: Fix failures of checksum Kunit tests · d5142519
    Chuck Lever authored
    Scott reports that when the new GSS krb5 Kunit tests are built as
    a separate module and loaded, the RFC 6803 and RFC 8009 checksum
    tests all fail, even though they pass when run under kunit.py.
    
    It appears that passing a buffer backed by static const memory to
    gss_krb5_checksum() is a problem. A printk in checksum_case() shows
    the correct plaintext, but by the time the buffer has been converted
    to a scatterlist and arrives at checksummer(), it contains all
    zeroes.
    
    Replacing this buffer with one that is dynamically allocated fixes
    the issue.
    Reported-by: default avatarScott Mayhew <smayhew@redhat.com>
    Fixes: 02142b2c ("SUNRPC: Add checksum KUnit tests for the RFC 6803 encryption types")
    Tested-by: default avatarScott Mayhew <smayhew@redhat.com>
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    d5142519
gss_krb5_test.c 70.3 KB