Summary: | NULL pointer dereference in ntpd | ||
---|---|---|---|
Product: | Base System | Reporter: | Benjamin Jacobs <freebsd> |
Component: | bin | Assignee: | Cy Schubert <cy> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | cy, freebsd, markj, mp, ziaee |
Priority: | --- | ||
Version: | Unspecified | ||
Hardware: | Any | ||
OS: | Any |
Description
Benjamin Jacobs
2025-02-27 08:36:44 UTC
Similar issue filed upstream: https://bugs.ntp.org/show_bug.cgi?id=3939 A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=628715fdcc9f2226bfe0f4ebe381aaa7761cb6cc commit 628715fdcc9f2226bfe0f4ebe381aaa7761cb6cc Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2025-02-28 15:46:23 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2025-02-28 15:53:22 +0000 ntp: NULL pointer deref when create_interface() fails Fix NULL pointer dereference when create_interface() fails in update_interfaces(). The upstream bug report says a typo was introduced by https://bk.ntp.org/ntp-dev/ntpd/ntp_io.c?PAGE=diffs&REV=66175036PETA6g__fON8oNrjL54Ttw. ep should have been ep2. Fix obtained from upstream bug report. PR: 285065 Upstream bug: https://bugs.ntp.org/show_bug.cgi?id=3939 MFC after: 1 minute contrib/ntp/ntpd/ntp_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=859aa726fb8642d8f329c7a34c51356c4eaeae88 commit 859aa726fb8642d8f329c7a34c51356c4eaeae88 Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2025-02-28 15:46:23 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2025-02-28 15:59:00 +0000 ntp: NULL pointer deref when create_interface() fails Fix NULL pointer dereference when create_interface() fails in update_interfaces(). The upstream bug report says a typo was introduced by https://bk.ntp.org/ntp-dev/ntpd/ntp_io.c?PAGE=diffs&REV=66175036PETA6g__fON8oNrjL54Ttw. ep should have been ep2. Fix obtained from upstream bug report. PR: 285065 Upstream bug: https://bugs.ntp.org/show_bug.cgi?id=3939 (cherry picked from commit 628715fdcc9f2226bfe0f4ebe381aaa7761cb6cc) contrib/ntp/ntpd/ntp_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=a3d32f9e6033a9083a22b7c9f25633430372e5b4 commit a3d32f9e6033a9083a22b7c9f25633430372e5b4 Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2025-02-28 15:46:23 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2025-02-28 15:58:54 +0000 ntp: NULL pointer deref when create_interface() fails Fix NULL pointer dereference when create_interface() fails in update_interfaces(). The upstream bug report says a typo was introduced by https://bk.ntp.org/ntp-dev/ntpd/ntp_io.c?PAGE=diffs&REV=66175036PETA6g__fON8oNrjL54Ttw. ep should have been ep2. Fix obtained from upstream bug report. PR: 285065 Upstream bug: https://bugs.ntp.org/show_bug.cgi?id=3939 (cherry picked from commit 628715fdcc9f2226bfe0f4ebe381aaa7761cb6cc) contrib/ntp/ntpd/ntp_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Fixed. Thanks for pointing this out. As ep is NULL in this else branch, shouldn't the &ep->sin (parameter to msyslog) be corrected similarly? |