From: Jiri Bohac <jbohac@suse.cz>
Subject: kabi; ip: drop IPSTATS_MIB_REASM_OVERLAPS
Patch-mainline: Never, KABI fix
References: bsc#1103097, CVE-2018-5391
patches.fixes/ip-discard-ipv4-datagrams-with-overlapping-segments.patch adds
the IPSTATS_MIB_REASM_OVERLAPS snmp attribute, whic breaks KABI.
Drop this attribute and account the dropped fragments in IPSTATS_MIB_REASMFAILS
instead.
Signed-off-by: Jiri Bohac <jbohac@suse.cz>
---
include/uapi/linux/snmp.h | 1 -
net/ipv4/ip_fragment.c | 2 +-
net/ipv4/proc.c | 1 -
3 files changed, 1 insertion(+), 3 deletions(-)
--- a/include/uapi/linux/snmp.h
+++ b/include/uapi/linux/snmp.h
@@ -55,7 +55,6 @@ enum
IPSTATS_MIB_ECT1PKTS, /* InECT1Pkts */
IPSTATS_MIB_ECT0PKTS, /* InECT0Pkts */
IPSTATS_MIB_CEPKTS, /* InCEPkts */
- IPSTATS_MIB_REASM_OVERLAPS, /* ReasmOverlaps */
__IPSTATS_MIB_MAX
};
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -479,7 +479,7 @@ found:
discard_qp:
inet_frag_kill(&qp->q, &ip4_frags);
err = -EINVAL;
- __IP_INC_STATS(net, IPSTATS_MIB_REASM_OVERLAPS);
+ __IP_INC_STATS(net, IPSTATS_MIB_REASMFAILS);
err:
kfree_skb(skb);
return err;
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
@@ -132,7 +132,6 @@ static const struct snmp_mib snmp4_ipext
SNMP_MIB_ITEM("InECT1Pkts", IPSTATS_MIB_ECT1PKTS),
SNMP_MIB_ITEM("InECT0Pkts", IPSTATS_MIB_ECT0PKTS),
SNMP_MIB_ITEM("InCEPkts", IPSTATS_MIB_CEPKTS),
- SNMP_MIB_ITEM("ReasmOverlaps", IPSTATS_MIB_REASM_OVERLAPS),
SNMP_MIB_SENTINEL
};