CVE-2022-49565

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-49565
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49565.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-49565
Downstream
Related
Published
2025-02-26T02:23:11Z
Modified
2025-10-15T22:33:05.499420Z
Summary
perf/x86/intel/lbr: Fix unchecked MSR access error on HSW
Details

In the Linux kernel, the following vulnerability has been resolved:

perf/x86/intel/lbr: Fix unchecked MSR access error on HSW

The fuzzer triggers the below trace.

[ 7763.384369] unchecked MSR access error: WRMSR to 0x689 (tried to write 0x1fffffff8101349e) at rIP: 0xffffffff810704a4 (nativewritemsr+0x4/0x20) [ 7763.397420] Call Trace: [ 7763.399881] <TASK> [ 7763.401994] intelpmulbrrestore+0x9a/0x1f0 [ 7763.406363] intelpmulbrschedtask+0x91/0x1c0 [ 7763.410992] _perfeventtaskschedin+0x1cd/0x240

On a machine with the LBR format LBRFORMATEIPFLAGS2, when the TSX is disabled, a TSX quirk is required to access LBR from registers. The lbrfromsignextquirkneeded() is introduced to determine whether the TSX quirk should be applied. However, the lbrfromsignextquirkneeded() is invoked before the intelpmulbrinit(), which parses the LBR format information. Without the correct LBR format information, the TSX quirk never be applied.

Move the lbrfromsignextquirkneeded() into the intelpmulbrinit(). Checking x86pmu.lbrhastsx in the lbrfromsignextquirkneeded() is not required anymore.

Both LBRFORMATEIPFLAGS2 and LBRFORMATINFO have LBRTSX flag, but only the LBRFORMATEIP_FLAGS2 requirs the quirk. Update the comments accordingly.

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1ac7fd8159a842b3aa51f0b46a351fa3eeb8fbf3
Fixed
625bcd0685a1612225df83468c83412fc0edb3d7
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1ac7fd8159a842b3aa51f0b46a351fa3eeb8fbf3
Fixed
b0380e13502adf7dd8be4c47d622c3522aae6c63

Affected versions

v5.*

v5.17
v5.17-rc1
v5.17-rc2
v5.17-rc3
v5.17-rc4
v5.17-rc5
v5.17-rc6
v5.17-rc7
v5.17-rc8
v5.18
v5.18-rc1
v5.18-rc2
v5.18-rc3
v5.18-rc4
v5.18-rc5
v5.18-rc6
v5.18-rc7
v5.18.1
v5.18.10
v5.18.11
v5.18.12
v5.18.13
v5.18.14
v5.18.2
v5.18.3
v5.18.4
v5.18.5
v5.18.6
v5.18.7
v5.18.8
v5.18.9
v5.19-rc1
v5.19-rc2
v5.19-rc3
v5.19-rc4
v5.19-rc5
v5.19-rc6
v5.19-rc7

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.17.0
Fixed
5.18.15