🇰🇷 한글 설명
Linux 커널의 fuse-uring 구성 요소에서 copy_from_user() 함수가 실패할 때 발생하는 오류 처리 결함입니다. 오류 발생 시 반환되는 양수 잔여값이 에러 코드(-EFAULT)를 덮어씌워, 시스템이 오류를 성공으로 잘못 판단하고 초기화되지 않은 데이터를 처리하게 만듭니다.
💡 쉬운 설명
데이터를 복사하다가 문제가 생겼을 때, 컴퓨터가 '문제가 생겼다'고 말하는 대신 '성공했다'고 착각하는 버그입니다. 이로 인해 잘못된 데이터가 시스템에 사용될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fuse-uring: fix EFAULT clobber in fuse_uring_commit
copy_from_user() returns the number of bytes not copied as an unsigned
residual on failure (1..sizeof(struct fuse_out_header)). fuse_uring_commit
stores that residual in ssize_t err, sets req->out.h.error to -EFAULT,
then jumps to out: with err still holding the positive residual.
err = copy_from_user(&req->out.h, &ent->headers->in_out,
sizeof(req->out.h));
if (err) {
req->out.h.error = -EFAULT;
goto out; /* err is the positive residual */
}
...
out:
fuse_uring_req_end(ent, req, err);
fuse_uring_req_end() then runs
if (error)
req->out.h.error = error;
which overwrites the just-assigned -EFAULT with the positive residual.
FUSE callers such as fuse_simple_request() test err < 0 to detect
failure, so the positive value is interpreted as success and the
caller proceeds with an uninitialised or partial req->out.args.
Fix by assigning err = -EFAULT in the failure branch before jumping
to out, so fuse_uring_req_end() receives a negative errno and sets
req->out.h.error to -EFAULT.
📍 영향받는 시스템
Linux kernel (fuse-uring 모듈을 사용하는 버전)
⚔️ 공격 벡터
사용자 공간에서 조작된 데이터를 통해 copy_from_user() 호출 시 EFAULT를 유도하여 커널의 잘못된 데이터 처리를 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 fuse_uring_commit의 오류 처리 로직을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 보안 공지(Changelog)와 대조합니다.