In the Linux kernel, the following vulnerability has been resolved:
libbpf: Use OPTSSET() macro in bpfxdp_query()
When the featureflags and xdpzcmaxsegs fields were added to the libbpf bpfxdpqueryopts, the code writing them did not use the OPTSSET() macro. This causes libbpf to write to those fields unconditionally, which means that programs compiled against an older version of libbpf (with a smaller size of the bpfxdpquery_opts struct) will have its stack corrupted by libbpf writing out of bounds.
The patch adding the featureflags field has an early bail out if the featureflags field is not part of the opts struct (via the OPTSHAS) macro, but the patch adding xdpzcmaxsegs does not. For consistency, this fix just changes the assignments to both fields to use the OPTS_SET() macro.