🇰🇷 한글 설명
Linux 커널의 arm64 아키텍처에서 ptrace를 통한 시스템 호출 추적 시, x0 레지스터와 orig_x0 값이 동기화되지 않는 취약점이 발견되었습니다. 이로 인해 디버거(tracer)가 seccomp 또는 audit 검사를 우회하여 시스템 호출의 첫 번째 인자를 조작할 수 있는 문제가 발생할 수 있습니다.
💡 쉬운 설명
해커가 시스템의 보안 검사를 몰래 통과하기 위해 프로그램이 전달하는 첫 번째 명령어를 중간에서 가로채 조작할 수 있는 결함입니다. 보안 필터가 작동하기 전에 값이 바뀌어 버려 보안 규칙을 무력화할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
arm64: ptrace: Keep 'orig_x0' in-sync with x0 on syscall entry
Commit e057b9477232 ("arm64: syscall: Ensure saved x0 is kept in-sync
with tracer updates") attempted to resolve a long-standing issue with
syscall entry tracing, where a tracer is able to manipulate the first
syscall argument without being subjected to seccomp or audit checking.
Unfortunately, that fix was incomplete [1], as it failed to update
'orig_x0' between a tracer updating x0 during a seccomp ptrace exit
(SECCOMP_RET_TRACE) and the seccomp filter being re-evaluated.
Rather than add hooks to the core seccomp code, instead move the
synchronisation code into the ptrace GPR and syscall setting code so
that 'orig_x0' is kept up to date with x0 whenever we're stopped on the
syscall entry path.
📍 영향받는 시스템
arm64 아키텍처를 사용하는 Linux 커널 (패치 적용 전 버전)
⚔️ 공격 벡터
ptrace를 사용하는 디버거를 통해 seccomp 필터가 재평가되기 전 시스템 호출 인자(x0)를 조작함
🛡️ 대응 방법
커널 패치(Commit e057b9477232 포함 버전)를 적용하여 ptrace GPR 및 syscall 설정 코드의 동기화 로직을 업데이트해야 함
🔧 검증 코드
커널 버전 확인 후 해당 취약점을 해결한 커밋 해시(e057b9477232)가 포함되어 있는지 확인합니다.
uname -a && git log -1 --format=%H | grep e057b9477232