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)
Sat, Mar 21, 7:32 AM
Unknown Object (File)
Mar 7 2026, 5:34 AM
Unknown Object (File)
Mar 6 2026, 6:28 PM
Unknown Object (File)
Mar 5 2026, 9:41 PM
Unknown Object (File)
Mar 1 2026, 12:13 PM
Unknown Object (File)
Feb 27 2026, 4:30 PM
Unknown Object (File)
Feb 8 2026, 12:35 PM
Unknown Object (File)
Feb 8 2026, 4:33 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