[Bug 279875] sockstat: segmentation fault

[email protected]
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279875

--- Comment #8 from [email protected] ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=35f4984343229545881a324a00cdbb3980d675ce

commit 35f4984343229545881a324a00cdbb3980d675ce
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2024-07-20 00:30:55 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2024-07-21 08:51:42 +0000

    sockstat(1): tolerate situation where file info cannot be fetched

    Either due to a race, or to the privilege restrictions, it is not
    guaranteed that kern.files returned file information for all pcbs
    read from net.inet.<proto>.pcblist.  In this case the file rbtree does
    not return the matching file by data address, and code must avoid
    dereferencing NULL.

    PR:     279875
    Reviewed by:    asomers
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D46050

 usr.bin/sockstat/sockstat.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.