linux/crypto/krb5
Eric Biggers b19f1ab8d5 crypto: krb5 - Fix memory leak in krb5_test_one_prf()
Fix a leak reported by kmemleak:

    unreferenced object 0xffff8880093bf7a0 (size 32):
      comm "swapper/0", pid 1, jiffies 4294877529
      hex dump (first 32 bytes):
        9d 18 86 16 f6 38 52 fe 86 91 5b b8 40 b4 a8 86  .....8R...[.@...
        ff 3e 6b b0 f8 19 b4 9b 89 33 93 d3 93 85 42 95  .>k......3....B.
      backtrace (crc 8ba12f3b):
        kmemleak_alloc+0x8d/0xa0
        __kmalloc_noprof+0x3cd/0x4d0
        prep_buf+0x36/0x70
        load_buf+0x10d/0x1c0
        krb5_test_one_prf+0x1e1/0x3c0
        krb5_selftest.cold+0x7c/0x54c
        crypto_krb5_init+0xd/0x20
        do_one_initcall+0xa5/0x230
        do_initcalls+0x213/0x250
        kernel_init_freeable+0x220/0x260
        kernel_init+0x1d/0x170
        ret_from_fork+0x301/0x410
        ret_from_fork_asm+0x1a/0x30

Fixes: fc0cf10c04 ("crypto/krb5: Implement crypto self-testing")
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2025-07-18 20:52:00 +10:00
..
internal.h crypto/krb5: Implement crypto self-testing 2025-03-02 21:56:47 +00:00
Kconfig crypto/krb5: Implement crypto self-testing 2025-03-02 21:56:47 +00:00
krb5_api.c crypto/krb5: Implement crypto self-testing 2025-03-02 21:56:47 +00:00
krb5_kdf.c crypto/krb5: Provide infrastructure and key derivation 2025-03-02 21:47:07 +00:00
Makefile crypto/krb5: Implement crypto self-testing 2025-03-02 21:56:47 +00:00
rfc3961_simplified.c crypto/krb5: Fix change to use SG miter to use offset 2025-04-29 11:28:50 -07:00
rfc3962_aes.c crypto/krb5: Implement the AES enctypes from rfc3962 2025-03-02 21:52:48 +00:00
rfc6803_camellia.c crypto/krb5: Implement the Camellia enctypes from rfc6803 2025-03-02 21:55:23 +00:00
rfc8009_aes2.c crypto/krb5: Implement the AES enctypes from rfc8009 2025-03-02 21:53:55 +00:00
selftest.c crypto: krb5 - Fix memory leak in krb5_test_one_prf() 2025-07-18 20:52:00 +10:00
selftest_data.c crypto/krb5: Implement crypto self-testing 2025-03-02 21:56:47 +00:00