Skip to contentSkip to conversation

netfilter: ctnetlink: fix missing CTA_NAT_SEQ_UNSPEC

PATCH Applied Pablo Neira Ayuso 2 participants 4 messages Dec 10, 2008 – Dec 15, 2008 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 netfilter: ctnetlink: fix missing CTA_NAT_SEQ_UNSPEC

This patch fixes an inconsistency in nfnetlink_conntrack.h that I introduced myself. The problem is that CTA_NAT_SEQ_UNSPEC is missing from enum ctattr_natseq. This inconsistency may lead to problems in the message parsing in userspace (if the message contains the CTA_NAT_SEQ_* attributes, of course).

This patch breaks backward compatibility, however, the only known client of this code is libnetfilter_conntrack which indeed crashes because it assumes the existence of CTA_NAT_SEQ_UNSPEC to do the parsing.

The CTA_NAT_SEQ_* attributes were introduced in 2.6.25.

---

 include/linux/netfilter/nfnetlink_conntrack.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
include/linux/netfilter/nfnetlink_conntrack.h +1 -0
index c19595c..29fe9ea 100644
@@ -141,6 +141,7 @@ enum ctattr_protonat {
 #define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1)
 
 enum ctattr_natseq {
+	CTA_NAT_SEQ_UNSPEC,
 	CTA_NAT_SEQ_CORRECTION_POS,
 	CTA_NAT_SEQ_OFFSET_BEFORE,
 	CTA_NAT_SEQ_OFFSET_AFTER,
#1 lore raw
Quoted 6 lines · Pablo Neira Ayuso

This patch fixes an inconsistency in nfnetlink_conntrack.h that I introduced myself. The problem is that CTA_NAT_SEQ_UNSPEC is missing from enum ctattr_natseq. This inconsistency may lead to problems in the message parsing in userspace (if the message contains the CTA_NAT_SEQ_* attributes, of course).

Quoted 6 lines

This patch breaks backward compatibility, however, the only known client of this code is libnetfilter_conntrack which indeed crashes because it assumes the existence of CTA_NAT_SEQ_UNSPEC to do the parsing.

The CTA_NAT_SEQ_* attributes were introduced in 2.6.25.

Applied, thanks.

author maintainer
#2 lore raw
Quoted 7 lines · Patrick McHardy
Quoted 6 lines · Pablo Neira Ayuso

This patch fixes an inconsistency in nfnetlink_conntrack.h that I introduced myself. The problem is that CTA_NAT_SEQ_UNSPEC is missing from enum ctattr_natseq. This inconsistency may lead to problems in the message parsing in userspace (if the message contains the CTA_NAT_SEQ_* attributes, of course).

Quoted 8 lines
Quoted 6 lines

This patch breaks backward compatibility, however, the only known client of this code is libnetfilter_conntrack which indeed crashes because it assumes the existence of CTA_NAT_SEQ_UNSPEC to do the parsing.

The CTA_NAT_SEQ_* attributes were introduced in 2.6.25.

Applied, thanks.

Thanks Patrick. This one should go to 2.6.28 as bugfix I think. Do you plan to pass it to David?

Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers
#3 lore raw
Quoted 13 lines · Pablo Neira Ayuso
Quoted 12 lines · Patrick McHardy
Quoted 11 lines · Pablo Neira Ayuso

This patch fixes an inconsistency in nfnetlink_conntrack.h that I introduced myself. The problem is that CTA_NAT_SEQ_UNSPEC is missing from enum ctattr_natseq. This inconsistency may lead to problems in the message parsing in userspace (if the message contains the CTA_NAT_SEQ_* attributes, of course).

This patch breaks backward compatibility, however, the only known client of this code is libnetfilter_conntrack which indeed crashes because it assumes the existence of CTA_NAT_SEQ_UNSPEC to do the parsing.

Quoted 5 lines
Quoted 2 lines
Quoted 1 line

The CTA_NAT_SEQ_* attributes were introduced in 2.6.25.

Applied, thanks.

Thanks Patrick. This one should go to 2.6.28 as bugfix I think. Do you plan to pass it to David?

Yes, I'll send it to Dave tonight.