Page MenuHomeFreeBSD

ndp: cope with unresolved neighbours
ClosedPublic

Authored by kp on Sep 18 2023, 5:03 PM.
Tags
None
Referenced Files
F174460280: D41903.id127510.diff
Sat, Oct 3, 10:38 AM
Unknown Object (File)
Wed, Sep 30, 8:17 PM
Unknown Object (File)
Wed, Sep 30, 8:16 PM
Unknown Object (File)
Sun, Sep 20, 5:22 AM
Unknown Object (File)
Thu, Sep 17, 7:11 AM
Unknown Object (File)
Wed, Sep 16, 1:12 AM
Unknown Object (File)
Tue, Sep 8, 12:04 AM
Unknown Object (File)
Tue, Sep 8, 12:03 AM
Subscribers

Details

Summary

If we've not (yet) resolved a neighbour nda_lladdr will be NULL, and
NLA_DATA_LEN(neigh->nda_lladdr) will dereference a NULL pointer.

Avoid that by checking nda_lladdr first, and only dereferencing if it's
not NULL.

Test case:
ping6 -c 1 <non-existant neighbour>
ndp -a

MFC after: 3 days
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 53631
Build 50522: arc lint + arc unit