netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Nfnetlink and ipset fixes
@ 2012-06-28 12:57 Tomasz Bursztyka
  2012-06-28 12:57 ` [PATCH 1/3] nfnetlink: Check callbacks before using those in nfnetlink_rcv_msg Tomasz Bursztyka
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Tomasz Bursztyka @ 2012-06-28 12:57 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Tomasz Bursztyka

Hi,

The 2 first patches fixes the same issue, but in 2 different place.

Patch 1:

So here is how the issue can be reprocuced:
Create a netlink message, targeting ipset subsystem. And send a command on id 0 (IPSET_CMD_NONE):
This will lead to a crash on line 188 of nfnetlink.c since nc->call is NULL (so you get a NULL dereference).

Or Patch 2:

Same issue.
It fixes ipset to handle the IPSET_CMD_NONE, return -EOPNOTSUPP.

Patch 3:

While doing patch 1 I figured out rcu_read_unlock() is not called in case nla_parse() error, so it fixes it.

Br,

Tomasz Bursztyka (3):
  nfnetlink: Check callbacks before using those in nfnetlink_rcv_msg
  ipset: Handle properly an IPSET_CMD_NONE
  nfnetlink: Unlock a previously locked rcu_read in nfnetlink_rcv_msg

 net/netfilter/ipset/ip_set_core.c |   12 ++++++++++++
 net/netfilter/nfnetlink.c         |    8 ++++++--
 2 files changed, 18 insertions(+), 2 deletions(-)

-- 
1.7.8.6


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

end of thread, other threads:[~2012-07-04 20:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-28 12:57 [PATCH 0/3] Nfnetlink and ipset fixes Tomasz Bursztyka
2012-06-28 12:57 ` [PATCH 1/3] nfnetlink: Check callbacks before using those in nfnetlink_rcv_msg Tomasz Bursztyka
2012-06-29 11:15   ` Pablo Neira Ayuso
2012-06-29 19:03     ` Jan Engelhardt
2012-06-30  8:54       ` Florian Westphal
2012-07-04 20:54         ` Pablo Neira Ayuso
2012-06-28 12:57 ` [PATCH 2/3] ipset: Handle properly an IPSET_CMD_NONE Tomasz Bursztyka
2012-06-28 14:40   ` Jozsef Kadlecsik
2012-06-29 11:13     ` Pablo Neira Ayuso
2012-06-28 12:57 ` [PATCH 3/3] nfnetlink: Unlock a previously locked rcu_read in nfnetlink_rcv_msg Tomasz Bursztyka
2012-06-28 13:30   ` Eric Dumazet
2012-06-29 11:13     ` 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).