summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorLiping Zhang <liping.zhang@spreadtrum.com>2016-07-23 16:00:32 +0800
committerPablo Neira Ayuso <pablo@netfilter.org>2016-07-23 12:25:00 +0200
commit4b512e1c1f8de6b9ceb796ecef8658e0a083cab7 (patch)
treeb08800a4b51d21848f8747b41995c6136fbbfb58 /tools/perf/scripts/python/bin
parent2bf4fade54de995f84d319ae02003609dca450f3 (diff)
downloadkernel-4b512e1c1f8de6b9ceb796ecef8658e0a083cab7.tar.gz
netfilter: nft_compat: fix crash when related match/target module is removed
We "cache" the loaded match/target modules and reuse them, but when the modules are removed, we still point to them. Then we may end up with invalid memory references when using iptables-compat to add rules later. Input the following commands will reproduce the kernel crash: # iptables-compat -A INPUT -j LOG # iptables-compat -D INPUT -j LOG # rmmod xt_LOG # iptables-compat -A INPUT -j LOG BUG: unable to handle kernel paging request at ffffffffa05a9010 IP: [<ffffffff813f783e>] strcmp+0xe/0x30 Call Trace: [<ffffffffa05acc43>] nft_target_select_ops+0x83/0x1f0 [nft_compat] [<ffffffffa058a177>] nf_tables_expr_parse+0x147/0x1f0 [nf_tables] [<ffffffffa058e541>] nf_tables_newrule+0x301/0x810 [nf_tables] [<ffffffff8141ca00>] ? nla_parse+0x20/0x100 [<ffffffffa057fa8f>] nfnetlink_rcv+0x33f/0x53d [nfnetlink] [<ffffffffa057f94b>] ? nfnetlink_rcv+0x1fb/0x53d [nfnetlink] [<ffffffff817116b8>] netlink_unicast+0x178/0x220 [<ffffffff81711a5b>] netlink_sendmsg+0x2fb/0x3a0 [<ffffffff816b7fc8>] sock_sendmsg+0x38/0x50 [<ffffffff816b8a7e>] ___sys_sendmsg+0x28e/0x2a0 [<ffffffff816bcb7e>] ? release_sock+0x1e/0xb0 [<ffffffff81804ac5>] ? _raw_spin_unlock_bh+0x35/0x40 [<ffffffff816bcbe2>] ? release_sock+0x82/0xb0 [<ffffffff816b93d4>] __sys_sendmsg+0x54/0x90 [<ffffffff816b9422>] SyS_sendmsg+0x12/0x20 [<ffffffff81805172>] entry_SYSCALL_64_fastpath+0x1a/0xa9 So when nobody use the related match/target module, there's no need to "cache" it. And nft_[match|target]_release are useless anymore, remove them. Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
012-03-21 17:54:58 -0700'>2012-03-21hugetlbfs: avoid taking i_mutex from hugetlbfs_read()Aneesh Kumar K.V 2012-03-21hugetlbfs: fix hugetlb_get_unmapped_area()Xiao Guangrong 2012-03-20switch open-coded instances of d_make_root() to new helperAl Viro 2012-01-12mm: compaction: introduce sync-light migration for use by compactionMel Gorman 2012-01-12mm: compaction: determine if dirty pages can be migrated without blocking wit...Mel Gorman 2012-01-03hugetlbfs: propagate umode_tAl Viro 2012-01-03hugetlbfs: switch to inode_init_owner()Al Viro 2012-01-03switch ->mknod() to umode_tAl Viro 2012-01-03switch ->create() to umode_tAl Viro 2012-01-03switch vfs_mkdir() and ->mkdir() to umode_tAl Viro 2012-01-03vfs: fix the stupidity with i_dentry in inode destructorsAl Viro 2011-11-02filesystems: add missing nlink wrappersMiklos Szeredi 2011-08-25lockdep: Add helper function for dir vs file i_mutex annotationJosh Boyer 2011-07-25Merge 'akpm' patch seriesLinus Torvalds 2011-07-25fs/hugetlbfs/inode.c: fix pgoff alignment checking on 32-bitBecky Bruce 2011-07-24VFS : mount lock scalability for internal mountsTim Chen 2011-05-26mm: don't access vm_flags as 'int'KOSAKI Motohiro 2011-05-25mm: Convert i_mmap_lock to a mutexPeter Zijlstra 2011-03-22mm: hugetlbfs: change remove_from_page_cacheMinchan Kim 2011-01-07fs: icache RCU free inodesNick Piggin 2010-11-12hugetlbfs: lessen the impact of a deprecation warningDave Jones 2010-10-29convert get_sb_nodev() usersAl Viro 2010-10-26Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vir...Linus Torvalds 2010-10-26Merge branch 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/l...Linus Torvalds 2010-10-25fs: do not assign default i_ino in new_inodeChristoph Hellwig 2010-10-15llseek: automatically add .llseek fopArnd Bergmann 2010-10-08hugetlb: hugepage migration coreNaoya Horiguchi