Skip to content

S26 Kernel Vulnerability Verifier: Reduce false positives when kernel source download fails #1925

@nikepakou

Description

@nikepakou

Problem Background

The current S26 module generates a large number of false positives when kernel source download fails:

  1. cve-bin-tool detects CVEs based on version numbers -> generates many potential CVEs
  2. Wait for kernel source download -> download fails/times out
  3. Result: CVEs are reported but cannot be verified -> large number of false positives

Proposed Solution

Approach 1: Adjust Execution Order

Adjust the order of symbol extraction and CVE detection, first ensure verification capability before CVE detection.

Approach 2: Symbol-based CVE Filtering

When kernel source download fails, extract CVE-related function/symbol information from the NVD database for matching.

Implementation Suggestions

Modify Download Wait Logic

# Near line 268-270
if [[ "${lWAIT_CNT}" -gt 60 ]] || [[ -f "${TMP_DIR}"/linux_download_failed ]]; then
    print_output "[-] No valid kernel source file available ... switching to symbol-based verification"
    export KERNEL_SOURCE_AVAILABLE=0
else
    export KERNEL_SOURCE_AVAILABLE=1
fi

Add Degraded Verification Mode

if [[ "${KERNEL_SOURCE_AVAILABLE}" -eq 0 ]]; then
    symbol_name_verifier "${lCVE}" "${lK_VERSION}" "${lCVSS3}"
else
    symbol_verifier "${lCVE}" "${lK_VERSION}" "${lK_PATH}" "${lCVSS3}" "${lKERNEL_DIR}"
fi

Challenges and Limitations

Challenge Description Solution
Incomplete NVD data Not all CVEs contain affected function name info Keep unverifiable CVEs and mark as unverified
Inaccurate function name matching Same function name may appear in different contexts Combine version number and function name for dual verification
Incomplete symbol table Firmware may strip some symbols Use string search as supplementary method

Expected Results

  • Reduce false positive rate: From hundreds of unverified CVEs to dozens with symbol matches
  • Improve accuracy: Symbol-based verification is more accurate than pure version number matching
  • Maintain coverage: Do not miss truly vulnerable CVEs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Core modules (Sxx)The core scanning modules (Sxx modules)EMBAbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions