Page MenuHomeFreeBSD

hwpmc_x86: Fix NULL deref when loading on unsupported hardware
ClosedPublic

Authored by bnovkov on Sat, Dec 21, 11:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 2, 6:00 PM
Unknown Object (File)
Wed, Jan 1, 11:11 AM
Unknown Object (File)
Tue, Dec 31, 10:17 AM
Unknown Object (File)
Mon, Dec 30, 10:43 AM
Unknown Object (File)
Sun, Dec 29, 10:25 AM
Unknown Object (File)
Sat, Dec 28, 10:14 AM
Unknown Object (File)
Fri, Dec 27, 10:55 PM
Unknown Object (File)
Thu, Dec 26, 2:48 PM
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 Not Applicable
Unit
Tests Not Applicable