Traditional tftp file access control: read access: tftpd(8) - tftpd will allow only publicly readable files to be accessed. write access: tftpd(8) - files may be written only if they already exist and are publicly writable. Test condition: files may be written only if they are publicly writable (i.e. mode ??2). Summary, libexec/tftpd write access: absolute filenames: all modes (??0 ??2 ??4) - correct. relative filenames: mode ??0 - incorrect 6.1 (RELEASE-p2 tested) mode ??2 - incorrect 4.11 (RELEASE-p9 tested) mode ??4 - incorrect both - 4.11 and 6.1 Fix: 1) 6.1-RELEASE-p2: diff -up libexec/tftpd/tftpd.c.orig libexec/tftpd/tftpd.c 2) 4.11-RELEASE-p9: diff -up libexec/tftpd/tftpd.c.orig libexec/tftpd/tftpd.c How-To-Repeat: for example: ~# grep '^tftp' /etc/inetd.conf tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /spool/tftp ~# touch a ~# touch /spool/tftp/a ~# chown nobody:nogroup /spool/tftp/a 1) mode ??0 ~# chmod 640 /spool/tftp/a ~# tftp localhost 1a) 6.1-RELEASE-p2 tftp| put a /a Error code 2: Access violation ! error - correct tftp| put a a ! no error - incorrect 1b) 4.11-RELEASE-p9 tftp| put a /a Error code 2: Access violation ! error - correct tftp| put a a Error code 2: Access violation ! error - correct 2) mode ??2 ~# chmod 642 /spool/tftp/a ~# tftp localhost 2a) 6.1-RELEASE-p2 tftp| put a /a ! no error - correct tftp| put a a ! no error - correct 2b) 4.11-RELEASE-p9 tftp| put a /a ! no error - correct tftp| put a a Error code 2: Access violation ! error - incorrect 3) mode ??4 ~# chmod 644 /spool/tftp/a ~# tftp localhost 3a) 6.1-RELEASE-p2 tftp| put a /a Error code 2: Access violation ! error - correct tftp| put a a ! no error - incorrect 3b) 4.11-RELEASE-p9 tftp| put a /a Error code 2: Access violation ! error - correct tftp| put a a ! no error - incorrect
Responsible Changed From-To: freebsd-bugs->edwin I'm interested in TFTP.
Responsible Changed From-To: edwin->freebsd-bugs Give back into the pool until later.
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped
I'm having difficulty understanding your complaint, but I think it's a duplicate of 225996, which is already fixed. *** This bug has been marked as a duplicate of bug 225996 ***