The branch main has been updated by kp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=0a16f62701f163f85449ad6c6dcf742b5247e8d2

commit 0a16f62701f163f85449ad6c6dcf742b5247e8d2
Author:     Kristof Provost <k...@freebsd.org>
AuthorDate: 2025-05-22 09:23:59 +0000
Commit:     Kristof Provost <k...@freebsd.org>
CommitDate: 2025-05-23 13:06:33 +0000

    icmp6: zero out pad space
    
    In icmp6_redirect_output() we potentially add padding, but failed to clear 
this
    memory. This triggered a KMSAN panic during the sys/netinet/carp:unicast_v6
    test.
    
    Reviewed by:    zlei
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    Differential Revision:  https://reviews.freebsd.org/D50461
---
 sys/netinet6/icmp6.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 764e57ef9b76..eaf8514fd5cf 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -2605,6 +2605,7 @@ nolladdropt:
                                /* pad if easy enough, truncate if not */
                                if (8 - extra <= M_TRAILINGSPACE(m0)) {
                                        /* pad */
+                                       bzero(m0->m_data + m0->m_len, 8 - 
extra);
                                        m0->m_len += (8 - extra);
                                        m0->m_pkthdr.len += (8 - extra);
                                } else {

Reply via email to