🇰🇷 한글 설명
Linux 커널의 fs/binfmt_elf 모듈 load_elf_binary() 함수에서 메모리 누수가 발견되었습니다. interp_elf_ex 메모리 할당이 실패하면 interpreter 파일 리소스가 해제되지 않는 문제이며, out_free_file 오류 처리 경로를 추가하여 수정되었습니다.
💡 쉬운 설명
프로그램을 실행할 때 사용하는 파일 자원이 메모리 부족 상황에서 정리되지 않고 남아 있는 문제입니다. 시스템 안정성에 영향을 줄 수 있으나 직접적인 외부 공격 위험은 제한적입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fs/binfmt_elf: Fix memory leak in load_elf_binary()
There is a memory leak reported by kmemleak:
unreferenced object 0xffff88817104ef80 (size 224):
comm "xfs_admin", pid 47165, jiffies 4298708825 (age 1333.476s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
60 a8 b3 00 81 88 ff ff a8 10 5a 00 81 88 ff ff `.........Z.....
backtrace:
[<ffffffff819171e1>] __alloc_file+0x21/0x250
[<ffffffff81918061>] alloc_empty_file+0x41/0xf0
[<ffffffff81948cda>] path_openat+0xea/0x3d30
[<ffffffff8194ec89>] do_filp_open+0x1b9/0x290
[<ffffffff8192660e>] do_open_execat+0xce/0x5b0
[<ffffffff81926b17>] open_exec+0x27/0x50
[<ffffffff81a69250>] load_elf_binary+0x510/0x3ed0
[<ffffffff81927759>] bprm_execve+0x599/0x1240
[<ffffffff8192a997>] do_execveat_common.isra.0+0x4c7/0x680
[<ffffffff8192b078>] __x64_sys_execve+0x88/0xb0
[<ffffffff83bbf0a5>] do_syscall_64+0x35/0x80
If "interp_elf_ex" fails to allocate memory in load_elf_binary(),
the program will take the "out_free_ph" error handing path,
resulting in "interpreter" file resource is not released.
Fix it by adding an error handing path "out_free_file", which will
release the file resource when "interp_elf_ex" failed to allocate
memory.
📍 영향받는 시스템
패치 이전의 Linux 커널 (해당 수정이 포함되지 않은 커널 버전 전반)
⚔️ 공격 벡터
로컬 사용자가 메모리 부족 상황을 유발하여 파일 리소스 누수를 반복적으로 일으키는 방식으로 서비스 거부(자원 고갈)를 유도할 수 있습니다.
🛡️ 대응 방법
배포판 보안 업데이트를 통해 수정된 Linux 커널로 업그레이드하거나 커널 패치를 적용하고 재부팅합니다.
🔧 검증 코드
출력된 커널 버전을 배포판의 보안 권고문과 대조하여 CVE-2022-50466 수정이 포함된 버전인지 확인하며, 수정 버전 이상이면 패치가 적용된 것입니다.