Closed
Bug 1967826
Opened 10 months ago
Closed 9 months ago
Assertion failure: len > 0 && len < ARCFOUR_STATE_SIZE, at ../../lib/freebl/arcfour.c:125
Categories
(NSS :: Libraries, defect, P5)
NSS
Libraries
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mdauer, Assigned: nwipper)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
OSS-Fuzz: https://oss-fuzz.com/testcase-detail/5180937115860992
Details
The assertion exists since the initial checkin of ARCFour. Interestingly, the case is handled fine immediately afterwards:
/* verify the key length. */
PORT_Assert(len > 0 && len < ARCFOUR_STATE_SIZE);
if (len == 0 || len >= ARCFOUR_STATE_SIZE) {
PORT_SetError(SEC_ERROR_BAD_KEY);
return SECFailure;
}
Marking this as security sensitive for now since I'm not sure about the implications of this. Feel free to adjust.
To reproduce, perform the following steps:
- Build NSS with
./build.sh -c --fuzz --disable-tests - Run
/path/to/dist/Debug/bin/nssfuzz-pkcs12 /path/to/testcase
Comment 1•10 months ago
|
||
The code follows the assert with actually enforcing the condition in code (len is unsigned) so this isn't a security bug.
Group: crypto-core-security
Updated•9 months ago
|
Severity: -- → S4
Flags: needinfo?(nwipper)
Priority: -- → P5
| Assignee | ||
Comment 2•9 months ago
|
||
Assert case was handled with an error immediately afterwards.
| Assignee | ||
Updated•9 months ago
|
Assignee: nobody → nwipper
Flags: needinfo?(nwipper)
| Assignee | ||
Comment 3•9 months ago
|
||
Since the assert covers the exact same case as the "proper" check, removing it should be fine, and make the fuzzer happy (no more assert crashes). The patch is on try here which is looking good so far.
| Assignee | ||
Updated•9 months ago
|
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Updated•9 months ago
|
Attachment #9497870 -
Attachment description: Bug 1967826 - remove unneccessary assertion r=#nss-reviewers → Bug 1967826 - remove unneccessary assertion in arcfour.c r=#nss-reviewers
Comment 4•9 months ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•