nday
CVE-2024-38540

bnxt_re: avoid shift undefined behavior in bnxt_qplib_alloc_init_hwq

Linux / Linux

披露于 。本站尚未获取修复依据,不能据此认为没有补丁。四个 PoC 来源都还没有收录。尚未列入 CISA KEV。

标签 攻击途径本地无需用户交互 产品Linux kernel 产品类型操作系统
这些标签的依据

这些标签由 nday 按固定规则从下列事实自动推导,不是 NVD、编号分配方或其他来源给出的。全部标签和规则见 ~/tags。

本地
ADP CISA-ADP 给出的 CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H(CVSS 3.1)中的 AV:L
无需用户交互
ADP CISA-ADP 给出的 CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H(CVSS 3.1)中的 UI:N
Linux kernel
CVE 记录列出的受影响产品:Linux · LinuxNVD 分析人员标为易受攻击的 CPE 名称:o:linux:linux_kernel
操作系统
CVE 记录列出的受影响产品:Linux · LinuxNVD 分析人员标为易受攻击的 CPE 名称:o:linux:linux_kernelnday 产品登记表中 Linux kernel 的产品类型
当前阶段
DIS
披露
CVSS
4.4 MEDIUM v3.1

生命周期

横轴 UTC;点=精确到分钟,宽条=仅日期,空心=未知或推定。
时间未知
DIS披露
2024-06-19T13:35Z
PAT补丁
尚无记录
ANA分析
尚无记录
POCPoC
尚无记录
ITW在野
尚无记录
KEVKEV
尚无记录

摘要

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

bnxt_re: avoid shift undefined behavior in bnxt_qplib_alloc_init_hwq

Undefined behavior is triggered when bnxt_qplib_alloc_init_hwq is called with hwq_attr->aux_depth != 0 and hwq_attr->aux_stride == 0. In that case, "roundup_pow_of_two(hwq_attr->aux_stride)" gets called. roundup_pow_of_two is documented as undefined for 0.

Fix it in the one caller that had this combination.

The undefined behavior was detected by UBSAN:

UBSAN: shift-out-of-bounds in ./include/linux/log2.h:57:13
shift exponent 64 is too large for 64-bit type 'long unsigned int'
CPU: 24 PID: 1075 Comm: (udev-worker) Not tainted 6.9.0-rc6+ #4
Hardware name: Abacus electric, s.r.o. - [email protected] Super Server/H12SSW-iN, BIOS 2.7 10/25/2023
Call Trace:
 <TASK>
 dump_stack_lvl+0x5d/0x80
 ubsan_epilogue+0x5/0x30
 __ubsan_handle_shift_out_of_bounds.cold+0x61/0xec
 __roundup_pow_of_two+0x25/0x35 [bnxt_re]
 bnxt_qplib_alloc_init_hwq+0xa1/0x470 [bnxt_re]
 bnxt_qplib_create_qp+0x19e/0x840 [bnxt_re]
 bnxt_re_create_qp+0x9b1/0xcd0 [bnxt_re]
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? __kmalloc+0x1b6/0x4f0
 ? create_qp.part.0+0x128/0x1c0 [ib_core]
 ? __pfx_bnxt_re_create_qp+0x10/0x10 [bnxt_re]
 create_qp.part.0+0x128/0x1c0 [ib_core]
 ib_create_qp_kernel+0x50/0xd0 [ib_core]
 create_mad_qp+0x8e/0xe0 [ib_core]
 ? __pfx_qp_event_handler+0x10/0x10 [ib_core]
 ib_mad_init_device+0x2be/0x680 [ib_core]
 add_client_context+0x10d/0x1a0 [ib_core]
 enable_device_and_get+0xe0/0x1d0 [ib_core]
 ib_register_device+0x53c/0x630 [ib_core]
 ? srso_alias_return_thunk+0x5/0xfbef5
 bnxt_re_probe+0xbd8/0xe50 [bnxt_re]
 ? __pfx_bnxt_re_probe+0x10/0x10 [bnxt_re]
 auxiliary_bus_probe+0x49/0x80
 ? driver_sysfs_add+0x57/0xc0
 really_probe+0xde/0x340
 ? pm_runtime_barrier+0x54/0x90
 ? __pfx___driver_attach+0x10/0x10
 __driver_probe_device+0x78/0x110
 driver_probe_device+0x1f/0xa0
 __driver_attach+0xba/0x1c0
 bus_for_each_dev+0x8f/0xe0
 bus_add_driver+0x146/0x220
 driver_register+0x72/0xd0
 __auxiliary_driver_register+0x6e/0xd0
 ? __pfx_bnxt_re_mod_init+0x10/0x10 [bnxt_re]
 bnxt_re_mod_init+0x3e/0xff0 [bnxt_re]
 ? __pfx_bnxt_re_mod_init+0x10/0x10 [bnxt_re]
 do_one_initcall+0x5b/0x310
 do_init_module+0x90/0x250
 init_module_from_file+0x86/0xc0
 idempotent_init_module+0x121/0x2b0
 __x64_sys_finit_module+0x5e/0xb0
 do_syscall_64+0x82/0x160
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? syscall_exit_to_user_mode_prepare+0x149/0x170
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? syscall_exit_to_user_mode+0x75/0x230
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? do_syscall_64+0x8e/0x160
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? __count_memcg_events+0x69/0x100
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? count_memcg_events.constprop.0+0x1a/0x30
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? handle_mm_fault+0x1f0/0x300
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? do_user_addr_fault+0x34e/0x640
 ? srso_alias_return_thunk+0x5/0xfbef5
 ? srso_alias_return_thunk+0x5/0xfbef5
 entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7f4e5132821d
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e3 db 0c 00 f7 d8 64 89 01 48
RSP: 002b:00007ffca9c906a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
RAX: ffffffffffffffda RBX: 0000563ec8a8f130 RCX: 00007f4e5132821d
RDX: 0000000000000000 RSI: 00007f4e518fa07d RDI: 000000000000003b
RBP: 00007ffca9c90760 R08: 00007f4e513f6b20 R09: 00007ffca9c906f0
R10: 0000563ec8a8faa0 R11: 0000000000000246 R12: 00007f4e518fa07d
R13: 0000000000020000 R14: 0000563ec8409e90 R15: 0000563ec8a8fa60
 </TASK>
---[ end trace ]---

以上是 CVE 记录(cvelist)中的原文,未经改写。

利用条件

按 CVSS 向量说明攻击需要的条件。
攻击途径 AV:L
本地:需要本地或 SSH 会话,或诱使用户在本机上操作
攻击复杂度 AC:L
低:不依赖特殊条件,攻击者可预期重复成功
所需权限 PR:H
高:管理员或同等的高权限
用户交互 UI:N
无:除攻击者外不需要任何人配合

CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H

CVSS 3.1 向量,来自 CVE 记录,由 ADP CISA-ADP 补充。

事件记录

+DIS披露

CVE 记录发布,编号分配方是 Linux。CVSS 4.4,中危。

来源 cvelist · 本站 批量导入 · 原始记录
{
  "id": 336116,
  "type": "disclosed",
  "source": "cvelist",
  "url": "https://www.cve.org/CVERecord?id=CVE-2024-38540",
  "occurred_at": "2024-06-19T13:35:15.823Z",
  "observed_at": "2026-11-13T05:38:35.569196Z",
  "is_backfill": true,
  "dedupe_key": "",
  "detail": {
    "cvss": {
      "source": "adp:CISA-ADP",
      "vector": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H",
      "version": "3.1",
      "base_score": 4.4,
      "base_severity": "MEDIUM"
    },
    "ssvc": {
      "timestamp": "2024-06-24T15:37:42.492444Z",
      "automatable": "no",
      "exploitation": "none",
      "technical_impact": "partial"
    },
    "state": "PUBLISHED",
    "date_published": "2024-06-19T13:35:15.823Z",
    "assigner_short_name": "Linux"
  }
}

纠错

报告错误或缺失

页面有误或缺失?告诉编辑;采纳后在本页修订记录公开说明,上游数据不会被改动。

研究员讨论

近 7 天有 0 位研究员提到

研究员在 X 上提到此 CVE 的帖子,原文照录,nday 不核实。

尚未采集到名单内研究员在 X 上提到此 CVE 的帖子。

讨论

0 条评论

还没有评论。