If readlink returns the size of the buffer, an overflow may have (safely) occurred. Pass a buffer size of MAX_PATH+1 (the size of the actual buffer) to detect this scenario.
gui: Check for readlink buffer overflow and handle gracefully #25548
pull luke-jr wants to merge 1 commits into bitcoin:master from luke-jr:readlink_overflow_check changing 1 files +3 −2-
luke-jr commented at 11:45 PM on July 5, 2022: member
-
e049fd76f0
Bugfix: Check for readlink buffer overflow and handle gracefully
If readlink returns the size of the buffer, an overflow may have (safely) occurred. Pass a buffer size of MAX_PATH+1 (the size of the actual buffer) to detect this scenario.
- maflcko added the label GUI on Jul 6, 2022
- maflcko renamed this:
Bugfix: Check for readlink buffer overflow and handle gracefully
gui: Check for readlink buffer overflow and handle gracefully
on Jul 6, 2022 - maflcko added the label Bug on Jul 6, 2022
-
DrahtBot commented at 11:08 AM on September 23, 2022: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
No conflicts as of last run.
- hebasto approved
-
hebasto commented at 10:37 AM on October 5, 2022: member
ACK e049fd76f0d57c1e6400fbfbaf4cc6ebe540f16f.
From
man -s 2 readlinkon my Ubuntu 22.04:If the returned value equals
bufsiz, then truncation may have occurred. - fanquake merged this on Nov 1, 2022
- fanquake closed this on Nov 1, 2022
- fanquake referenced this in commit 067dc42b79 on Nov 1, 2022
- sidhujag referenced this in commit 95cb211084 on Nov 1, 2022
- bitcoin locked this on Nov 1, 2023