Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #15205

Closed (moved)
(moved)
Open
Created Mar 09, 2015 by Nick Mathewson@nickm🍬

There's something fishy in OSX's checked strlcat.

Have a look at https://opensource.apple.com/source/Libc/Libc-1044.1.2/secure/strlcat_chk.c .

When it checks to see whether the destination buffer overlaps with the input buffer in the second case, it isn't checking whether the input overlaps with the actual buffer that will be written; it's checking whether the input overlaps with the destination buffer, plus the extra space after the end of the destination buffer that would be written if there were enough room for the whole input.

I believe the second overlap check should be something more like:

    __chk_overlap(dest, len, src, len - initial_dstlen - 1);

To do:

  • Check whether any of the BSDs have this problem.
  • Check whether older OSXs have this problem.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking