netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nf-next 0/6] netfilter: remove support for variably-sized extensions
@ 2017-04-15 23:29 Florian Westphal
  2017-04-15 23:29 ` [PATCH nf-next 1/6] netfilter: conntrack: move helper struct to nf_conntrack_helper.h Florian Westphal
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Florian Westphal @ 2017-04-15 23:29 UTC (permalink / raw)
  To: netfilter-devel

3 years ago we had to bump the offsets to the extensions
(223b02d923ecd7c84cf9780bb3686f455d279279,
"netfilter: nf_conntrack: reserve two bytes for nf_ct_ext->len")
because total size of all extensions had increased to a point where u8
did overflow.

We already dieted the extensions back to more reasonable sizes, however,
I never wanted to switch back because overflow produces hard to diagnose
crash bugs, and we could not add compile-time assert because extensions
can be dynamically sized.

This series makes the last veriable-sized extension (helper)
fixed in size by adding a 32byte scratch area for helpers to use
and then adds the compile-time asserts to catch overflow during build
time.

 include/net/netfilter/nf_conntrack.h        |   19 ----------------
 include/net/netfilter/nf_conntrack_extend.h |   12 ++--------
 include/net/netfilter/nf_conntrack_helper.h |   31 ++++++++++++++++++++++----
 net/netfilter/nf_conntrack_amanda.c         |    2 +
 net/netfilter/nf_conntrack_core.c           |   33 ++++++++++++++++++++++++++++
 net/netfilter/nf_conntrack_extend.c         |   16 +++++--------
 net/netfilter/nf_conntrack_ftp.c            |    8 +++---
 net/netfilter/nf_conntrack_h323_main.c      |    6 +----
 net/netfilter/nf_conntrack_helper.c         |    6 +----
 net/netfilter/nf_conntrack_irc.c            |    2 -
 net/netfilter/nf_conntrack_netbios_ns.c     |    2 +
 net/netfilter/nf_conntrack_pptp.c           |    3 +-
 net/netfilter/nf_conntrack_sane.c           |    8 +++---
 net/netfilter/nf_conntrack_sip.c            |   14 +++++------
 net/netfilter/nf_conntrack_tftp.c           |    6 +++--
 net/netfilter/nfnetlink_cthelper.c          |   10 ++++++--
 16 files changed, 106 insertions(+), 72 deletions(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-04-19 15:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-15 23:29 [PATCH nf-next 0/6] netfilter: remove support for variably-sized extensions Florian Westphal
2017-04-15 23:29 ` [PATCH nf-next 1/6] netfilter: conntrack: move helper struct to nf_conntrack_helper.h Florian Westphal
2017-04-15 23:29 ` [PATCH nf-next 2/6] netfilter: helper: add build-time asserts for helper data size Florian Westphal
2017-04-15 23:29 ` [PATCH nf-next 3/6] netfilter: nfnetlink_cthelper: reject too large userspace allocation requests Florian Westphal
2017-04-15 23:29 ` [PATCH nf-next 4/6] netfilter: helpers: remove data_len usage for inkernel helpers Florian Westphal
2017-04-15 23:29 ` [PATCH nf-next 5/6] netfilter: remove last traces of variable-sized extensions Florian Westphal
2017-04-15 23:29 ` [PATCH nf-next 6/6] netfilter: conntrack: use u8 for extension sizes again Florian Westphal
2017-04-19 15:56 ` [PATCH nf-next 0/6] netfilter: remove support for variably-sized extensions Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).