[RH7] netfilter: nf_conntrack_h323: lost .data_len definition for Q.931/ipv6

Submitted by Vasily Averin on June 9, 2020, 8:41 a.m.

Details

Message ID eb2ff028-4226-fb50-ee86-cf351eabfd4d@virtuozzo.com
State New
Series "netfilter: nf_conntrack_h323: lost .data_len definition for Q.931/ipv6"
Headers show

Commit Message

Vasily Averin June 9, 2020, 8:41 a.m.
Lost .data_len definition leads to write beyond end of
struct nf_conn_help. Usually it corrupts following
struct nf_conn_nat, however if nat is not loaded it corrupts
following slab object.

https://patchwork.ozlabs.org/project/netfilter-devel/patch/c2385b5c-309c-cc64-2e10-a0ef62897502@virtuozzo.com/
https://bugs.openvz.org/browse/OVZ-7188
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
 net/netfilter/nf_conntrack_h323_main.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c
index f65d93639d12..29fe1e7eac88 100644
--- a/net/netfilter/nf_conntrack_h323_main.c
+++ b/net/netfilter/nf_conntrack_h323_main.c
@@ -1225,6 +1225,7 @@  static struct nf_conntrack_helper nf_conntrack_helper_q931[] __read_mostly = {
 	{
 		.name			= "Q.931",
 		.me			= THIS_MODULE,
+		.data_len		= sizeof(struct nf_ct_h323_master),
 		.tuple.src.l3num	= AF_INET6,
 		.tuple.src.u.tcp.port	= cpu_to_be16(Q931_PORT),
 		.tuple.dst.protonum	= IPPROTO_TCP,