Page MenuHomeFreeBSD

ndp: cope with unresolved neighbours
ClosedPublic

Authored by kp on Sep 18 2023, 5:03 PM.
Tags
None
Referenced Files
F137412324: D41903.diff
Sun, Nov 23, 5:22 AM
Unknown Object (File)
Sat, Nov 22, 11:30 AM
Unknown Object (File)
Fri, Nov 21, 9:34 PM
Unknown Object (File)
Fri, Nov 7, 11:20 AM
Unknown Object (File)
Thu, Nov 6, 4:43 AM
Unknown Object (File)
Tue, Nov 4, 4:32 AM
Unknown Object (File)
Fri, Oct 31, 1:45 PM
Unknown Object (File)
Mon, Oct 27, 7:27 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 Not Applicable
Unit
Tests Not Applicable