Page MenuHomeFreeBSD

hwpmc_x86: Fix NULL deref when loading on unsupported hardware
ClosedPublic

Authored by bnovkov on Dec 21 2024, 11:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 7, 4:15 PM
Unknown Object (File)
Wed, Oct 7, 3:45 PM
Unknown Object (File)
Wed, Oct 7, 1:45 PM
Unknown Object (File)
Wed, Oct 7, 4:13 AM
Unknown Object (File)
Mon, Sep 28, 7:48 AM
Unknown Object (File)
Sat, Sep 12, 1:03 AM
Unknown Object (File)
Thu, Sep 10, 2:00 PM
Unknown Object (File)
Sep 6 2026, 2:24 AM
Subscribers

Details

Summary

The pmc_md_{intialize, finalize} routines rely on a machine-dependent
structure to register the appropriate PMC interrupt handler. However,
the vendor-specific routines that allocate this structure may return
NULL for unsupported hardware, leading to a panic when the hwpmc module
gets loaded. This patch adds additional checks that fix this issue.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped