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)

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:

  1. Build NSS with ./build.sh -c --fuzz --disable-tests
  2. Run /path/to/dist/Debug/bin/nssfuzz-pkcs12 /path/to/testcase

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
Severity: -- → S4
Flags: needinfo?(nwipper)
Priority: -- → P5

Assert case was handled with an error immediately afterwards.

Assignee: nobody → nwipper
Flags: needinfo?(nwipper)

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.

Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Attachment #9497870 - Attachment description: Bug 1967826 - remove unneccessary assertion r=#nss-reviewers → Bug 1967826 - remove unneccessary assertion in arcfour.c r=#nss-reviewers
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: