Skip to content

libnl: add initial OSS-Fuzz integration#15282

Open
bybel wants to merge 2 commits into
google:masterfrom
bybel:add-libnl
Open

libnl: add initial OSS-Fuzz integration#15282
bybel wants to merge 2 commits into
google:masterfrom
bybel:add-libnl

Conversation

@bybel
Copy link
Copy Markdown

@bybel bybel commented Apr 1, 2026

Summary

libnl is a C library for working with the Linux Netlink protocol. It is widely used by NetworkManager, systemd, iproute2, and other core Linux networking components, making it a high-value fuzzing target for memory safety and parsing correctness issues.

This PR adds an initial OSS-Fuzz integration with 7 fuzz targets covering all major sub-libraries:

Fuzzer Library Coverage
fuzz_msg libnl-3 nlmsg_parse, nlmsg_validate, nlmsg_find_attr
fuzz_attr libnl-3 nla_parse, nla_validate, nla_find
fuzz_addr libnl-3 nl_addr_parse across all address families
fuzz_route libnl-route-3 rtnl_route_parse (RTM_NEWROUTE)
fuzz_neigh libnl-route-3 rtnl_neigh_parse (RTM_NEWNEIGH)
fuzz_ct libnl-nf-3 nfnlmsg_ct_parse (netfilter conntrack)
fuzz_idiag libnl-idiag-3 idiagnl_msg_parse (inet socket diagnostics)

Testing

Verified locally with python3 infra/helper.py check_build libnl:

INFO: performing bad build checks for fuzz_route
INFO: performing bad build checks for fuzz_idiag
INFO: performing bad build checks for fuzz_msg
INFO: performing bad build checks for fuzz_addr
INFO: performing bad build checks for fuzz_ct
INFO: performing bad build checks for fuzz_neigh
INFO: performing bad build checks for fuzz_attr
Check build passed.

Add fuzzing integration for libnl, a C library for the Linux Netlink
protocol used by NetworkManager, systemd, and iproute2.

Includes 7 fuzz targets covering all major sub-libraries:
- fuzz_msg/fuzz_attr/fuzz_addr: core netlink message and attribute parsing
- fuzz_route/fuzz_neigh: libnl-route (routes and neighbours)
- fuzz_ct: libnl-nf netfilter conntrack parsing
- fuzz_idiag: libnl-idiag inet socket diagnostics parsing

Tested locally with check_build (libfuzzer + asan).
@google-cla
Copy link
Copy Markdown

google-cla Bot commented Apr 1, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions
Copy link
Copy Markdown

ghost commented Apr 1, 2026

bybel is integrating a new project:
- Main repo: https://github.com/thom311/libnl
- Criticality score: 0.56589

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant