nf_osf_find() incorrectly returns true on mismatch, this leads to
copying uninitialized memory area in nft_osf which can be used to leak
stale kernel stack data to userspace.
Fixes:
22c7652cdaa8 ("netfilter: nft_osf: Add version option support")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
struct nf_osf_hdr_ctx ctx;
const struct tcphdr *tcp;
struct tcphdr _tcph;
struct nf_osf_hdr_ctx ctx;
const struct tcphdr *tcp;
struct tcphdr _tcph;
memset(&ctx, 0, sizeof(ctx));
memset(&ctx, 0, sizeof(ctx));
data->genre = f->genre;
data->version = f->version;
data->genre = f->genre;
data->version = f->version;
}
EXPORT_SYMBOL_GPL(nf_osf_find);
}
EXPORT_SYMBOL_GPL(nf_osf_find);