1.169 ALMA-09-021690

Information

If the Trivial File Transfer Protocol (TFTP) server is required, the TFTP daemon must be configured to operate in secure mode.

GROUP ID: V-269272
RULE ID: SV-269272r1050154

Restricting TFTP to a specific directory prevents remote users from copying, transferring, or overwriting system files. Using the "-s" option causes the TFTP service to only serve files from the given directory.

Solution

Configure the TFTP daemon to operate in secure mode with the following command:

$ systemctl edit tftp.service

Insert the following between the two sets of comments, making sure to add the "-s" option with a nonroot ("/") directory.

[Service]
ExecStart=
ExecStart=/usr/sbin/in.tftpd -s /tftp

See Also

https://workbench.cisecurity.org/benchmarks/27039