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
  1. luke-jr commented at 11:45 PM on July 5, 2022: member

    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.

  2. 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.
    e049fd76f0
  3. maflcko added the label GUI on Jul 6, 2022
  4. 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
  5. maflcko added the label Bug on Jul 6, 2022
  6. 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.

  7. fanquake commented at 4:13 PM on October 2, 2022: member
  8. hebasto approved
  9. hebasto commented at 10:37 AM on October 5, 2022: member

    ACK e049fd76f0d57c1e6400fbfbaf4cc6ebe540f16f.

    From man -s 2 readlink on my Ubuntu 22.04:

    If the returned value equals bufsiz, then truncation may have occurred.

  10. fanquake merged this on Nov 1, 2022
  11. fanquake closed this on Nov 1, 2022

  12. maflcko cross-referenced this on Nov 1, 2022 from issue [24.x] [gui] Bugfix: Check for readlink buffer overflow and handle gracefully by maflcko
  13. fanquake commented at 12:20 PM on November 1, 2022: member

    Backported to 24.x in #26434.

  14. fanquake referenced this in commit 067dc42b79 on Nov 1, 2022
  15. sidhujag referenced this in commit 95cb211084 on Nov 1, 2022
  16. bitcoin locked this on Nov 1, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:53 UTC