logoalt Hacker News

wahernyesterday at 9:08 PM1 replyview on HN

Or just assert the UID and GID of /tmp/.snap before using. Of course, you'd want to open(2) /tmp/.snap and use fstat(2) on a descriptor (not just pass the path, /tmp/.snap, to stat(2)), then use mkdirat, openat & friends consistently.


Replies

pbhjpbhjtoday at 1:15 AM

Seems to address the proximal issue but perhaps leaves open use in a chaining attack?