ASAN Crash in gcm_HashMult_hw when calling PK11_CreateContextBySymKey with CKM_AES_GCM
Categories
(NSS :: Libraries, defect, P2)
Tracking
(Not tracked)
People
(Reporter: noah.lokocz, Unassigned)
References
Details
(Keywords: sec-other)
Attachments
(1 file, 1 external file)
|
79 bytes,
text/plain
|
Details |
One of the fuzzing runs of this fuzzer leads to an ASAN crash within gcm_HashMult_hw when the CK_MECHANISM CKM_AES_GCM is used. The crash unit for the fuzzing run causing the crash is attached.
ASAN/Fuzzer output:
AddressSanitizer:DEADLYSIGNAL
==34631==ERROR: AddressSanitizer: SEGV on unknown address 0x7c7c837c7c9c7c7 (pc 0x0001025785c0 bp 0x00016dd19d70 sp 0x00016dd19d00 T0)
==34631==The signal is caused by a READ memory access.
#0 0x1025785c0 in gcm_HashMult_hw gcm-aarch64.c:41
#1 0x1024b6270 in gcmHash_Update gcm.c:384
#2 0x1024b8124 in gcm_InitCounter gcm.c:652
#3 0x1024b77e8 in GCM_CreateContext gcm.c:593
#4 0x10251d158 in AES_InitContext rijndael.c:1042
#5 0x10251e2d8 in AES_CreateContext rijndael.c:1092
#6 0x102381bd0 in sftk_CryptInit pkcs11c.c:1249
#7 0x102386a64 in NSC_EncryptInit pkcs11c.c:1457
#8 0x10227f80c in pk11_context_init pk11cxt.c:206
#9 0x10227ac70 in pk11_CreateNewContextInSlot pk11cxt.c:428
#10 0x10227a488 in PK11_CreateContextBySymKey pk11cxt.c:510
#11 0x1020e70cc in LLVMFuzzerTestOneInput nssfuzz-NSC_EncryptUpdate_DecryptUpdate.cc:140
#12 0x1026cecc8 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) FuzzerLoop.cpp:614
#13 0x1026ce5b0 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) FuzzerLoop.cpp:516
#14 0x1026cfcfc in fuzzer::Fuzzer::MutateAndTestOne() FuzzerLoop.cpp:760
#15 0x1026d0b3c in fuzzer::Fuzzer::Loop(std::__1::vector<fuzzer::SizedFile, std::__1::allocator<fuzzer::SizedFile>>&) FuzzerLoop.cpp:905
#16 0x1026c06f0 in fuzzer::FuzzerDriver(int*, char***, int ()(unsigned char const, unsigned long)) FuzzerDriver.cpp:911
#17 0x1026ea810 in main FuzzerMain.cpp:20
#18 0x18b655054 (<unknown module>)
#19 0x5854fffffffffffc (<unknown module>)
==34631==Register values:
x[0] = 0x3e3e3e3e3e3e3e3e x[1] = 0x0000000000000087 x[2] = 0x4057a46ea04e5c09 x[3] = 0x00000001028dd000
x[4] = 0x07c7c837c7c9c7c7 x[5] = 0x000000003e213e3e x[6] = 0x000000001757574c x[7] = 0x000000001373736a
x[8] = 0x0000000000000000 x[9] = 0x0000000003e3e3e2 x[10] = 0x000000000babbeea x[11] = 0x0000000102a5b000
x[12] = 0x000000001757574c x[13] = 0x0000000003e3e3e2 x[14] = 0x0000000003e3e3e2 x[15] = 0x0000000102882000
x[16] = 0x0000000000000001 x[17] = 0x0000000000000001 x[18] = 0x0000000000000000 x[19] = 0x000060e00052aa20
x[20] = 0x3e3e3e3e3e3e3e3e x[21] = 0x0000000007c7db08 x[22] = 0x0000007000020000 x[23] = 0x00000c1c000a5544
x[24] = 0x000000000bababa6 x[25] = 0x0000000000000070 x[26] = 0x000000001757574c x[27] = 0x000000001757574c
x[28] = 0x000000001757574c fp = 0x000000016dd19d70 lr = 0x0000000003e3f726 sp = 0x000000016dd19d00
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV gcm-aarch64.c:41 in gcm_HashMult_hw
==34631==ABORTING
MS: 3 ChangeByte-InsertByte-CMP- DE: "p\000\000\000"-; base unit: 454219f75cec1299c9db5b8057643b6b2ac73fbe
0x30,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0xf0,0xf1,0xf1,0xf1,0xf1,0xf1,0xf1,0xf1,0x0,0x0,0x0,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x21,0x3e,0x3e,0x3e,0x3e,0x3e,0x70,0x0,0x0,0x0,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x2c,0x3e,0x3e,0x3e,0x10,0x10,0x10,0x10,0x0,0x0,0x0,0x0,0x3e,0x3e,0x3e,0x10,0x4c,0x3e,0x3e,0x3e,0x3e,0x3e,0x0,0x0,0xf0,0xe6,0x10,
0>>>>>>>>>>>>>>>>\360\361\361\361\361\361\361\361\000\000\000>>>>>>>!>>>>>p\000\000\000>>>>>>>,>>>\020\020\020\020\000\000\000\000>>>\020L>>>>>\000\000\360\346\020
artifact_prefix='./'; Test unit written to ./crash-10b21d579c43a9a1adbe86071ebee1a089813e66
Base64: MD4+Pj4+Pj4+Pj4+Pj4+Pj7w8fHx8fHx8QAAAD4+Pj4+Pj4hPj4+Pj5wAAAAPj4+Pj4+Piw+Pj4QEBAQAAAAAD4+PhBMPj4+Pj4AAPDmEA==
zsh: abort ./nssfuzz-NSC_EncryptUpdate_DecryptUpdate
| Reporter | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 2•3 years ago
•
|
||
Noah,
Can you please check priority and severity for this ? Thank you !
Updated•3 years ago
|
| Reporter | ||
Comment 3•2 years ago
|
||
Duplicate of Bug 1861015. Invalid due to invalid API usage by the fuzzer.
Updated•2 months ago
|
Description
•