Skip to content
  • Jarod Wilson's avatar
    crypto: ccm - Fix handling of null assoc data · 516280e7
    Jarod Wilson authored
    Its a valid use case to have null associated data in a ccm vector, but
    this case isn't being handled properly right now.
    
    The following ccm decryption/verification test vector, using the
    rfc4309 implementation regularly triggers a panic, as will any
    other vector with null assoc data:
    
    * key: ab2f8a74b71cd2b1ff802e487d82f8b9
    * iv: c6fb7d800d13abd8a6b2d8
    * Associated Data: [NULL]
    * Tag Length: 8
    * input: d5e8939fc7892e2b
    
    The resulting panic looks like so:
    
    Unable to handle kernel paging request at ffff810064ddaec0 RIP: 
     [<ffffffff8864c4d7>] :ccm:get_data_to_compute+0x1a6/0x1d6
    PGD 8063 PUD 0 
    Oops: 0002 [1] SMP 
    last sysfs file: /module/libata/version
    CPU 0
    Modules linked in: crypto_tester_kmod(U) seqiv krng ansi_cprng chainiv rng ctr aes_generic aes_x86_64 ccm cryptomgr testmgr_cipher testmgr aead crypto_blkcipher crypto_a
    lgapi des ipv6 xfrm_nalgo crypto_api autofs4 hidp l2cap bluetooth nfs lockd fscache nfs_acl sunrpc ip_conntrack_netbios_ns ipt_REJECT xt_s...
    516280e7