Bug 1649648 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

This can be triggered via web-platform-tests. To enable this check add the following to your mozconfig:
`ac_add_options --enable-undefined-sanitizer="nonnull-attribute"`

```c
TEST-START | /WebCryptoAPI/derive_bits_keys

src/security/nss/lib/pk11wrap/pk11pbe.c:886:28: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:47:28: note: nonnull attribute specified here
    #0 0x7f5ee516adeb in pbe_PK11AlgidToParam src/security/nss/lib/pk11wrap/pk11pbe.c:886:9
    #1 0x7f5ee514d70f in PK11_ParamFromAlgid src/security/nss/lib/pk11wrap/pk11mech.c:1315:18
    #2 0x7f5ee516c32a in PK11_PBEKeyGen src/security/nss/lib/pk11wrap/pk11pbe.c:1404:17
    #3 0x7f5ece4085c1 in mozilla::dom::DerivePbkdfBitsTask::DoCrypto() src/dom/crypto/WebCryptoTask.cpp:2610:9
    #4 0x7f5ece3ea6c3 in CalculateResult src/dom/crypto/WebCryptoTask.cpp:394:10
    #5 0x7f5ece3ea6c3 in mozilla::dom::WebCryptoTask::Run() src/dom/crypto/WebCryptoTask.cpp:355:11
    #6 0x7f5ec8fea539 in nsThreadPool::Run() src/xpcom/threads/nsThreadPool.cpp:299:14
    #7 0x7f5ec8fdbdb3 in nsThread::ProcessNextEvent(bool, bool*) src/xpcom/threads/nsThread.cpp:1234:14
    #8 0x7f5ec8fe633c in NS_ProcessNextEvent(nsIThread*, bool) src/xpcom/threads/nsThreadUtils.cpp:513:10
    #9 0x7f5eca0f6e59 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:302:20
    #10 0x7f5eca013b57 in RunInternal src/ipc/chromium/src/base/message_loop.cc:334:10
    #11 0x7f5eca013b57 in RunHandler src/ipc/chromium/src/base/message_loop.cc:327:3
    #12 0x7f5eca013b57 in MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:309:3
    #13 0x7f5ec8fd4cea in nsThread::ThreadFunc(void*) src/xpcom/threads/nsThread.cpp:447:10
    #14 0x7f5ee6786fa7 in _pt_root src/nsprpub/pr/src/pthreads/ptthread.c:201:5
    #15 0x7f5eea4446da in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)
    #16 0x7f5ee942288e in clone /build/glibc-OTsEL5/glibc-2.27/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
```
This can be triggered via web-platform-tests. To enable this check add the following to your mozconfig:
`ac_add_options --enable-undefined-sanitizer="nonnull-attribute"`

```c
TEST-START | /WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.html?2001-3000

src/security/nss/lib/pk11wrap/pk11pbe.c:886:28: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:47:28: note: nonnull attribute specified here
    #0 0x7f5ee516adeb in pbe_PK11AlgidToParam src/security/nss/lib/pk11wrap/pk11pbe.c:886:9
    #1 0x7f5ee514d70f in PK11_ParamFromAlgid src/security/nss/lib/pk11wrap/pk11mech.c:1315:18
    #2 0x7f5ee516c32a in PK11_PBEKeyGen src/security/nss/lib/pk11wrap/pk11pbe.c:1404:17
    #3 0x7f5ece4085c1 in mozilla::dom::DerivePbkdfBitsTask::DoCrypto() src/dom/crypto/WebCryptoTask.cpp:2610:9
    #4 0x7f5ece3ea6c3 in CalculateResult src/dom/crypto/WebCryptoTask.cpp:394:10
    #5 0x7f5ece3ea6c3 in mozilla::dom::WebCryptoTask::Run() src/dom/crypto/WebCryptoTask.cpp:355:11
    #6 0x7f5ec8fea539 in nsThreadPool::Run() src/xpcom/threads/nsThreadPool.cpp:299:14
    #7 0x7f5ec8fdbdb3 in nsThread::ProcessNextEvent(bool, bool*) src/xpcom/threads/nsThread.cpp:1234:14
    #8 0x7f5ec8fe633c in NS_ProcessNextEvent(nsIThread*, bool) src/xpcom/threads/nsThreadUtils.cpp:513:10
    #9 0x7f5eca0f6e59 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:302:20
    #10 0x7f5eca013b57 in RunInternal src/ipc/chromium/src/base/message_loop.cc:334:10
    #11 0x7f5eca013b57 in RunHandler src/ipc/chromium/src/base/message_loop.cc:327:3
    #12 0x7f5eca013b57 in MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:309:3
    #13 0x7f5ec8fd4cea in nsThread::ThreadFunc(void*) src/xpcom/threads/nsThread.cpp:447:10
    #14 0x7f5ee6786fa7 in _pt_root src/nsprpub/pr/src/pthreads/ptthread.c:201:5
    #15 0x7f5eea4446da in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)
    #16 0x7f5ee942288e in clone /build/glibc-OTsEL5/glibc-2.27/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
```

Back to Bug 1649648 Comment 0