It is fairly unusual for the output of locate to be fed into
another command. However, if this were to be done, this would
raise the same set of security issues as the use of ‘find ...
-print’. Although the problems relating to whitespace in file
names can be resolved by using locate's ‘-0’ option, this still
leaves the race condition problems associated with ‘find ...
-print0’. There is no way to avoid these problems in the case of
Old versions of locate have a bug in the way that old-format
databases are read. This bug affects the following versions of
The affected versions of locate read file names into a fixed-
length 1026 byte buffer, allocated on the heap. This buffer is
not extended if file names are too long to fit into the buffer.
No range checking on the length of the filename is performed.
This could in theory lead to a privilege escalation attack.
Findutils versions 4.3.0 to 4.3.6 are also affected. On systems
using the old database format and affected versions of locate,
carefully-chosen long file