Page MenuHomeFreeBSD

ndp: cope with unresolved neighbours
ClosedPublic

Authored by kp on Sep 18 2023, 5:03 PM.
Tags
None
Referenced Files
F133307949: D41903.id127510.diff
Fri, Oct 24, 8:07 PM
F133246391: D41903.id127507.diff
Fri, Oct 24, 7:08 AM
Unknown Object (File)
Wed, Oct 22, 7:17 AM
Unknown Object (File)
Sat, Oct 18, 6:23 AM
Unknown Object (File)
Wed, Oct 15, 1:59 AM
Unknown Object (File)
Sun, Oct 12, 7:38 PM
Unknown Object (File)
Sun, Oct 12, 7:38 PM
Unknown Object (File)
Sun, Oct 12, 7:38 PM
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