On Sun, Mar 22, 2015 at 10:05:10AM +0200, Denys Fedoryshchenko wrote: > On 2015-03-22 07:33, Patrick McHardy wrote: > >On 22.03, Denys Fedoryshchenko wrote: > >>Sorry for noise, seems git version working fine! > > > >Still this shouldn't be happening. Just to confirm, you were using an > >unpatched kernel and by git you mean nftables git? > > Yes, correct. I tested on 3.18.8 and 3.19.2 vanilla kernels (x86_64). > On nftables 0.4 it does crash, on nftables git it doesn't. I sent this fix to -stable by March 10th but this doesn't show up in 3.18.x and 3.19.x yet. [ upstream commit 02263db00b6cb98701332aa257c07ca549c2324b ] We have several problems in this path: 1) There is a use-after-free when removing individual elements from the commit path. 2) We have to uninit() the data part of the element from the abort path to avoid a chain refcount leak. 3) We have to check for set->flags to see if there's a mapping, instead of the element flags. 4) We have to check for !(flags & NFT_SET_ELEM_INTERVAL_END) to skip elements that are part of the interval that have no data part, so they don't need to be uninit(). Cc: <stable@xxxxxxxxxxxxxxx> # 3.18.x Cc: <stable@xxxxxxxxxxxxxxx> # 3.19.x Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> > >>On 2015-03-22 00:49, Denys Fedoryshchenko wrote: > >>>Additionally, if i will do "nft flush table mangle" , with this table > >>>added i will get this: > >>>[ 42.800078] ------------[ cut here ]------------ > >>>[ 42.800092] WARNING: CPU: 3 PID: 2868 at > >>>net/netfilter/nf_tables_api.c:4122 nft_data_uninit+0x35/0x50 > >>>[nf_tables]() -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html