NetBSD Problem Report #50665
From www@NetBSD.org Sun Jan 17 09:05:26 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.NetBSD.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 2A0D97ABFC
for <gnats-bugs@gnats.NetBSD.org>; Sun, 17 Jan 2016 09:05:26 +0000 (UTC)
Message-Id: <20160117090525.0BA867ACC7@mollari.NetBSD.org>
Date: Sun, 17 Jan 2016 09:05:25 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/libexec/ftpd/cmds.c:651]: (error) Dead pointer usage.
X-Send-Pr-Version: www-1.0
>Number: 50665
>Category: misc
>Synopsis: src/libexec/ftpd/cmds.c:651]: (error) Dead pointer usage.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: misc-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 17 09:10:00 +0000 2016
>Closed-Date: Sun Jan 17 14:50:55 +0000 2016
>Last-Modified: Tue Jan 29 12:10:00 +0000 2019
>Originator: David Binderman
>Release: cvs dated 20160116
>Organization:
>Environment:
>Description:
[src/libexec/ftpd/cmds.c:651]: (error) Dead pointer usage. Pointer 'pdir' is dead if it has been assigned '&dir' at line 647.
if (stat(realdir, &dir) == 0)
pdir = &dir;
}
}
pdirwok = 0;
if (pdir != NULL) {
but dir is local only to the previous block:
struct stat dir;
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50665 CVS commit: src/libexec/ftpd
Date: Sun, 17 Jan 2016 09:46:07 -0500
Module Name: src
Committed By: christos
Date: Sun Jan 17 14:46:07 UTC 2016
Modified Files:
src/libexec/ftpd: cmds.c
Log Message:
PR/50665: David Binderman: move "dir" to the outer scope so it stays alive
when the pointer is used later.
To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/libexec/ftpd/cmds.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sun, 17 Jan 2016 14:50:55 +0000
State-Changed-Why:
christos fixed it. Thanks for the PR!
From: "Luke Mewburn" <lukem@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50665 CVS commit: src/libexec/ftpd
Date: Tue, 29 Jan 2019 11:51:05 +0000
Module Name: src
Committed By: lukem
Date: Tue Jan 29 11:51:05 UTC 2019
Modified Files:
src/libexec/ftpd: version.h
Log Message:
NetBSD-ftpd 20180428
Update version to "NetBSD-ftpd 20180428" for changes:
- Fix violations of the sequence point rule.
- Check that stat and fstat succeed.
- Support blacklistd(8) hooks.
- Clear utmpx struct before writing it to wtmpx files.
- Fix directory stream leaks.
- Use explicit_memset(3) instead of memset(3) to clear password.
- Fix scope of variable. PR misc/50665.
- Ensure that closing socket exists. CID 603440.
- Add -f option to ftpd to stay in foreground with -D. PR bin/53221.
To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/libexec/ftpd/version.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Luke Mewburn" <lukem@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50665 CVS commit: othersrc/libexec/tnftpd/src
Date: Tue, 29 Jan 2019 12:06:33 +0000
Module Name: othersrc
Committed By: lukem
Date: Tue Jan 29 12:06:33 UTC 2019
Update of /cvsroot/othersrc/libexec/tnftpd/src
In directory ivanova.netbsd.org:/tmp/cvs-serv4616
Log Message:
Import NetBSD ftpd as at 20190129
Notable changes:
- Fix violations of the sequence point rule.
- Add volatile for gcc 5.
- Check that stat and fstat succeed.
- Support blacklistd(8) hooks.
- Clear utmpx struct before writing it to wtmpx files.
- Fix directory stream leaks.
- Use explicit_memset(3) instead of memset(3) to clear password.
- Fix scope of variable. PR misc/50665.
- Ensure that closing socket exists. CID 603440.
- Add -f option to ftpd to stay in foreground with -D. PR bin/53221.
- Update version to "NetBSD-ftpd 20180428".
Status:
Vendor Tag: NetBSD
Release Tags: NetBSD-20190129
U othersrc/libexec/tnftpd/src/ftpd.conf.5
C othersrc/libexec/tnftpd/src/popen.c
C othersrc/libexec/tnftpd/src/ftpcmd.y
C othersrc/libexec/tnftpd/src/ftpd.c
C othersrc/libexec/tnftpd/src/extern.h
U othersrc/libexec/tnftpd/src/ftpusers.5
N othersrc/libexec/tnftpd/src/pfilter.c
C othersrc/libexec/tnftpd/src/version.h
U othersrc/libexec/tnftpd/src/pathnames.h
U othersrc/libexec/tnftpd/src/logutmp.c
N othersrc/libexec/tnftpd/src/pfilter.h
C othersrc/libexec/tnftpd/src/ftpd.8
C othersrc/libexec/tnftpd/src/Makefile
U othersrc/libexec/tnftpd/src/conf.c
C othersrc/libexec/tnftpd/src/logwtmp.c
C othersrc/libexec/tnftpd/src/cmds.c
9 conflicts created by this import.
Use the following command to help the merge:
cvs checkout -jNetBSD:yesterday -jNetBSD othersrc/libexec/tnftpd/src
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.