diff options
| author | Cy Schubert <cy@FreeBSD.org> | 2025-11-21 00:16:04 +0000 |
|---|---|---|
| committer | Cy Schubert <cy@FreeBSD.org> | 2025-11-21 00:28:25 +0000 |
| commit | ac1f48b4a7be104d222dea60f1da946fcb345fb1 (patch) | |
| tree | e0cd76d99288d1c157a1c93ee981990f77879a37 | |
| parent | a4aa7df767e0df49ca3294d2b578be25812364d8 (diff) | |
ntpd: Fix segfault when same IP on multiple interfaces
Use the protype socket to obtain the IP address for an error message.
Using the resultant socket address, a NULL because create_interface()
had failed, results in SIGSEGV.
To reproduce this bug,
ifconfig bridge100 create
ifconfig bridge100 10.10.10.10/24
ifconfig bridge101 create
ifconfig bridge101 10.10.10.10/24
ntpd -n
PR: 291119
MFC after: 3 days
| -rw-r--r-- | contrib/ntp/ntpd/ntp_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/ntp/ntpd/ntp_io.c b/contrib/ntp/ntpd/ntp_io.c index 9c4f6c1553e3..97b85ee83e36 100644 --- a/contrib/ntp/ntpd/ntp_io.c +++ b/contrib/ntp/ntpd/ntp_io.c @@ -1923,7 +1923,7 @@ update_interfaces( msyslog(LOG_ERR, "cannot bind address %s", - stoa(&ep->sin)); + stoa(&ep2->sin)); } free(ep2); } |
