Restricting path name lookup with openat2()
Restricting path name lookup with openat2()
Posted Aug 24, 2019 5:23 UTC (Sat) by cyphar (subscriber, #110703)In reply to: Restricting path name lookup with openat2() by pr1268
Parent article: Restricting path name lookup with openat2()
Yes, openat2(2) checks that it's zeroed. It's not particularly expensive, there's an optimised function for doing checks like that in lib/ (memchr_inv). Zeroing structures and flag bits before passing them to the kernel is already a very common practice (as discussed in this LWN article).
