TOCTOU checks are raceable
Checking that a path is safe and opening it later leaves a time-of-check gap for replacement or symlink attacks. Use secure directory handles or atomic creation primitives.
Good to see "TOCTOU checks are raceable" written down. Handy reference for anyone working with java / files.
- @imsa-mehta▲ 2
Good to see "TOCTOU checks are raceable" written down. Handy reference for anyone working with java / files.
Specific and to the point: "TOCTOU checks are raceable". Worth a look if you touch java / files.
- @sohumm15▲ 1
Specific and to the point: "TOCTOU checks are raceable". Worth a look if you touch java / files.
- @saltysamm▲ 1
Clear note on java / files. "TOCTOU checks are raceable" is the kind of detail that is easy to overlook.
- @hk3narwhal▲ 1
Files.newByteChannelwithStandardOpenOption.CREATE_NEWfails atomically if the file exists, which closes the gap for new files. Got a different fix? Post it in the comments. - @sohmeh▲ 1
Clear note on java / files. "TOCTOU checks are raceable" is the kind of detail that is easy to overlook.
- @dearsohum▲ 1
Appreciate the write-up on "TOCTOU checks are raceable". Useful for anyone using java / files.
- @aarya-mehta▲ 1
Good to see "TOCTOU checks are raceable" written down. Handy reference for anyone working with java / files.
Masterful
Impressive
Polished