Blame SOURCES/0005-object-Avoid-obj_ops-array-overrun.patch

462cee
From 34e115c1a9657f07ed8a39b81c6b21fba1faa319 Mon Sep 17 00:00:00 2001
462cee
From: Phil Sutter <psutter@redhat.com>
462cee
Date: Tue, 29 Jan 2019 18:12:15 +0100
462cee
Subject: [PATCH] object: Avoid obj_ops array overrun
462cee
462cee
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1661327
462cee
Upstream Status: libnftnl commit 16c44d9f42170
462cee
462cee
commit 16c44d9f42170264c4d484478c76e940951f1b70
462cee
Author: Phil Sutter <phil@nwl.cc>
462cee
Date:   Thu Dec 20 21:03:27 2018 +0100
462cee
462cee
    object: Avoid obj_ops array overrun
462cee
462cee
    In version 1.1.1, obj_ops array was smaller than __NFT_OBJECT_MAX since
462cee
    there are no ops for NFT_OBJECT_CONNLIMIT. Avoid this potential issue in
462cee
    the future by defining the array size.
462cee
462cee
    Signed-off-by: Phil Sutter <phil@nwl.cc>
462cee
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
462cee
---
462cee
 src/object.c | 2 +-
462cee
 1 file changed, 1 insertion(+), 1 deletion(-)
462cee
462cee
diff --git a/src/object.c b/src/object.c
462cee
index d8278f3..7fb9bab 100644
462cee
--- a/src/object.c
462cee
+++ b/src/object.c
462cee
@@ -25,7 +25,7 @@
462cee
 #include <buffer.h>
462cee
 #include "obj.h"
462cee
 
462cee
-static struct obj_ops *obj_ops[] = {
462cee
+static struct obj_ops *obj_ops[__NFT_OBJECT_MAX] = {
462cee
 	[NFT_OBJECT_COUNTER]	= &obj_ops_counter,
462cee
 	[NFT_OBJECT_QUOTA]	= &obj_ops_quota,
462cee
 	[NFT_OBJECT_CT_HELPER]	= &obj_ops_ct_helper,
462cee
-- 
462cee
1.8.3.1
462cee