NetBSD Problem Report #4218
Received: (qmail 20990 invoked by uid 1000); 3 Oct 1997 23:00:17 -0000
Message-Id: <19971003230017.20989.qmail@mail.NetBSD.ORG>
Date: 3 Oct 1997 23:00:17 -0000
From: cgd@netbsd.org
Reply-To: cgd@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: tftpd must be run as root
X-Send-Pr-Version: 3.95
>Number: 4218
>Category: bin
>Synopsis: tftpd must be run as root
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 03 16:05:08 +0000 1997
>Closed-Date: Wed Jul 29 11:30:55 +0000 1998
>Last-Modified: Wed Jul 29 11:31:43 +0000 1998
>Originator: Chris G. Demetriou
>Release: NetBSD-current as of October 1, 1997
>Organization:
Kernel Hackers 'r' Us
>Environment:
System: NetBSD brick.demetriou.com 1.2G NetBSD 1.2G (BRICK) #116: Wed Jul 16 14:03:06 PDT 1997 cgd@brick.demetriou.com:/usr/src/sys/arch/i386/compile/BRICK i386
>Description:
tftpd must be run as root. if run as a normal user, it fails
and exits after logging a message about a failure to set its
group ID.
The tftpd manual page says:
The server should have the user ID with the lowest
possible privilege.
which makes sense, but the program refuses to work unless
it's run as root. The root requirement makes sense if -s is
used (since it has to chroot), but otherwise should be
unnecessary and may worsen security problems.
It's also arguably nice to have the ability to run tftpd
with a special user id. (On a related note, it might be
nice to add a way to specify what user/group to switch to,
if root.)
>How-To-Repeat:
Enable tftpd in inetd.conf, with a user id set to something
other than 'root' (or any other user with uid 0).
>Fix:
None provided.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: lukem
State-Changed-When: Wed Jul 29 04:30:55 PDT 1998
State-Changed-Why:
added -u user and -g group functionality to tftpd.
it won't try the setuid or setgid if the uid/gid is already correct.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.49 2026/05/14 01:52:41 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.