Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2024-42240— x86/bhi: Avoid warning in #DB handler due to BHI mitigation

EPSS 0.01% · P0
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2024-42240

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
x86/bhi: Avoid warning in #DB handler due to BHI mitigation
Source: NVD (National Vulnerability Database)
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: x86/bhi: Avoid warning in #DB handler due to BHI mitigation When BHI mitigation is enabled, if SYSENTER is invoked with the TF flag set then entry_SYSENTER_compat() uses CLEAR_BRANCH_HISTORY and calls the clear_bhb_loop() before the TF flag is cleared. This causes the #DB handler (exc_debug_kernel()) to issue a warning because single-step is used outside the entry_SYSENTER_compat() function. To address this issue, entry_SYSENTER_compat() should use CLEAR_BRANCH_HISTORY after making sure the TF flag is cleared. The problem can be reproduced with the following sequence: $ cat sysenter_step.c int main() { asm("pushf; pop %ax; bts $8,%ax; push %ax; popf; sysenter"); } $ gcc -o sysenter_step sysenter_step.c $ ./sysenter_step Segmentation fault (core dumped) The program is expected to crash, and the #DB handler will issue a warning. Kernel log: WARNING: CPU: 27 PID: 7000 at arch/x86/kernel/traps.c:1009 exc_debug_kernel+0xd2/0x160 ... RIP: 0010:exc_debug_kernel+0xd2/0x160 ... Call Trace: <#DB> ? show_regs+0x68/0x80 ? __warn+0x8c/0x140 ? exc_debug_kernel+0xd2/0x160 ? report_bug+0x175/0x1a0 ? handle_bug+0x44/0x90 ? exc_invalid_op+0x1c/0x70 ? asm_exc_invalid_op+0x1f/0x30 ? exc_debug_kernel+0xd2/0x160 exc_debug+0x43/0x50 asm_exc_debug+0x1e/0x40 RIP: 0010:clear_bhb_loop+0x0/0xb0 ... </#DB> <TASK> ? entry_SYSENTER_compat_after_hwframe+0x6e/0x8d </TASK> [ bp: Massage commit message. ]
Source: NVD (National Vulnerability Database)
CVSS Information
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Type
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel 存在安全漏洞,该漏洞源于 x86/bhi 模块BHI缓解机制在处理SYSENTER调用时存在问题。当设置了TF标志位时,entry_SYSENTER_compat在清除TF标志位之前使用了CLEAR_BRANCH_HISTORY,导致DB处理器发出警告。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

VendorProductAffected VersionsCPESubscribe
LinuxLinux bd53ec80f21839cfd4d852a6088279d602d67e5b ~ db56615e96c439e13783d7715330e824b4fd4b84 -
LinuxLinux 6.9 -

II. Public POCs for CVE-2024-42240

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-42240

登录查看更多情报信息。

Same Patch Batch · Linux · 2024-08-07 · 19 CVEs total

CVE-2024-42242mmc: sdhci: Fix max_seg_size for 64KiB PAGE_SIZE
CVE-2024-42232libceph: fix race between delayed_work() and ceph_monc_stop()
CVE-2024-42234mm: fix crashes from deferred split racing folio migration
CVE-2024-42233filemap: replace pte_offset_map() with pte_offset_map_nolock()
CVE-2024-42235s390/mm: Add NULL pointer check to crst_table_free() base_crst_free()
CVE-2024-42236usb: gadget: configfs: Prevent OOB read/write in usb_string_copy()
CVE-2024-42237firmware: cs_dsp: Validate payload length before processing block
CVE-2024-42238firmware: cs_dsp: Return error if block header overflows file
CVE-2024-42239bpf: Fail bpf_timer_cancel when callback is being cancelled
CVE-2024-42250cachefiles: add missing lock protection when polling
CVE-2024-42241mm/shmem: disable PMD-sized page cache if needed
CVE-2024-42244USB: serial: mos7840: fix crash on resume
CVE-2024-42243mm/filemap: make MAX_PAGECACHE_ORDER acceptable to xarray
CVE-2024-42245Revert "sched/fair: Make sure to try to detach at least one movable task"
CVE-2024-42246net, sunrpc: Remap EPERM in case of connection failure in xs_tcp_setup_socket
CVE-2024-42247wireguard: allowedips: avoid unaligned 64-bit memory accesses
CVE-2024-42249spi: don't unoptimize message in spi_async()
CVE-2024-42248tty: serial: ma35d1: Add a NULL check for of_node

IV. Related Vulnerabilities

V. Comments for CVE-2024-42240

No comments yet


Leave a comment