🔍 CVE-2023-53656

5.5
CVSS Score
MEDIUM
2025-10-07
2026-11-05 21:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 hisi perf 드라이버에서, CPU가 오프라인(teardown)으로 전환될 때 perf 컨텍스트를 아직 온라인 상태인 것으로 잘못 간주된 CPU로 마이그레이션하여 데드락이 발생하는 문제입니다. 수정안은 cpumask_any_but()를 사용해 실제로 활성 상태인 다른 CPU를 선택하는 것입니다.

💡 쉬운 설명

하드웨어 성능 측정 기능이 꺼지는 CPU로 작업을 넘기려다 시스템이 멈출 수 있는 결함입니다. 커널 업데이트로 살아있는 다른 CPU를 골라 넘기도록 고쳐집니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: drivers/perf: hisi: Don't migrate perf to the CPU going to teardown The driver needs to migrate the perf context if the current using CPU going to teardown. By the time calling the cpuhp::teardown() callback the cpu_online_mask() hasn't updated yet and still includes the CPU going to teardown. In current driver's implementation we may migrate the context to the teardown CPU and leads to the below calltrace: ... [ 368.104662][ T932] task:cpuhp/0 state:D stack: 0 pid: 15 ppid: 2 flags:0x00000008 [ 368.113699][ T932] Call trace: [ 368.116834][ T932] __switch_to+0x7c/0xbc [ 368.120924][ T932] __schedule+0x338/0x6f0 [ 368.125098][ T932] schedule+0x50/0xe0 [ 368.128926][ T932] schedule_preempt_disabled+0x18/0x24 [ 368.134229][ T932] __mutex_lock.constprop.0+0x1d4/0x5dc [ 368.139617][ T932] __mutex_lock_slowpath+0x1c/0x30 [ 368.144573][ T932] mutex_lock+0x50/0x60 [ 368.148579][ T932] perf_pmu_migrate_context+0x84/0x2b0 [ 368.153884][ T932] hisi_pcie_pmu_offline_cpu+0x90/0xe0 [hisi_pcie_pmu] [ 368.160579][ T932] cpuhp_invoke_callback+0x2a0/0x650 [ 368.165707][ T932] cpuhp_thread_fun+0xe4/0x190 [ 368.170316][ T932] smpboot_thread_fn+0x15c/0x1a0 [ 368.175099][ T932] kthread+0x108/0x13c [ 368.179012][ T932] ret_from_fork+0x10/0x18 ... Use function cpumask_any_but() to find one correct active cpu to fixes this issue.

📍 영향받는 시스템

hisi_pcie_pmu 드라이버를 사용하는 HiSilicon 기반 Linux 커널 시스템 (수정 이전 버전)

⚔️ 공격 벡터

로컬 사용자가 CPU 핫플러그(오프라인 전환)를 유발할 수 있는 상황에서 발생하는 커널 데드락으로, 원격 공격 경로는 확인되지 않음

🛡️ 대응 방법

해당 커널 보안 패치가 포함된 최신 Linux 커널로 업데이트 후 재부팅

🔧 검증 코드

커널 버전을 확인하고 hisi 관련 모듈이 로드되어 있는지 확인합니다. 모듈이 없으면 이 취약점의 영향을 받지 않으며, 있다면 배포판 커널 변경 로그에서 해당 패치 포함 여부를 확인해야 합니다.

Shell / Script
uname -r; grep -i hisi /proc/modules 2>/dev/null | head -5

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel