🔍 CVE-2021-47366

7.1
CVSS Score
HIGH
2024-05-21
2026-08-04 10:16
✅ 완료

🇰🇷 한글 설명

Linux 커널의 AFS 클라이언트에서 파일 위치나 크기가 2GB에서 4GB 사이일 때, 부호 있는 32비트 정수 처리 오류로 인해 데이터 읽기 시 손상이 발생할 수 있는 취약점입니다. 이 문제는 서버의 기능을 확인하는 대신 값의 상위 비트를 기준으로 RPC 방식을 전환하기 때문에 발생합니다.

💡 쉬운 설명

파일의 특정 위치(2GB~4GB 사이)를 읽을 때 컴퓨터가 숫자를 잘못 해석하여 데이터가 깨지는 문제입니다. 이로 인해 파일 내용이 변하거나 오류가 발생할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: afs: Fix corruption in reads at fpos 2G-4G from an OpenAFS server AFS-3 has two data fetch RPC variants, FS.FetchData and FS.FetchData64, and Linux's afs client switches between them when talking to a non-YFS server if the read size, the file position or the sum of the two have the upper 32 bits set of the 64-bit value. This is a problem, however, since the file position and length fields of FS.FetchData are *signed* 32-bit values. Fix this by capturing the capability bits obtained from the fileserver when it's sent an FS.GetCapabilities RPC, rather than just discarding them, and then picking out the VICED_CAPABILITY_64BITFILES flag. This can then be used to decide whether to use FS.FetchData or FS.FetchData64 - and also FS.StoreData or FS.StoreData64 - rather than using upper_32_bits() to switch on the parameter values. This capabilities flag could also be used to limit the maximum size of the file, but all servers must be checked for that. Note that the issue does not exist with FS.StoreData - that uses *unsigned* 32-bit values. It's also not a problem with Auristor servers as its YFS.FetchData64 op uses unsigned 64-bit values. This can be tested by cloning a git repo through an OpenAFS client to an OpenAFS server and then doing "git status" on it from a Linux afs client[1]. Provided the clone has a pack file that's in the 2G-4G range, the git status will show errors like: error: packfile .git/objects/pack/pack-5e813c51d12b6847bbc0fcd97c2bca66da50079c.pack does not match index error: packfile .git/objects/pack/pack-5e813c51d12b6847bbc0fcd97c2bca66da50079c.pack does not match index This can be observed in the server's FileLog with something like the following appearing: Sun Aug 29 19:31:39 2021 SRXAFS_FetchData, Fid = 2303380852.491776.3263114, Host 192.168.11.201:7001, Id 1001 Sun Aug 29 19:31:39 2021 CheckRights: len=0, for host=192.168.11.201:7001 Sun Aug 29 19:31:39 2021 FetchData_RXStyle: Pos 18446744071815340032, Len 3154 Sun Aug 29 19:31:39 2021 FetchData_RXStyle: file size 2400758866 ... Sun Aug 29 19:31:40 2021 SRXAFS_FetchData returns 5 Note the file position of 18446744071815340032. This is the requested file position sign-extended.

📍 영향받는 시스템

Linux kernel (AFS client 사용 환경)

⚔️ 공격 벡터

OpenAFS 서버를 사용하는 환경에서 대용량 파일(2GB-4GB 범위의 데이터 포함)을 읽을 때 데이터 손상 유발

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 AFS 기능 플래그(VICED_CAPABILITY_64BITFILES)를 사용하도록 수정해야 합니다.

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.

Shell / Script
uname -r

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Git