1. 02 3月, 2011 1 次提交
    • J
      netfilter: nf_log: avoid oops in (un)bind with invalid nfproto values · 9ef0298a
      Jan Engelhardt 提交于
      Like many other places, we have to check that the array index is
      within allowed limits, or otherwise, a kernel oops and other nastiness
      can ensue when we access memory beyond the end of the array.
      
      [ 5954.115381] BUG: unable to handle kernel paging request at 0000004000000000
      [ 5954.120014] IP:  __find_logger+0x6f/0xa0
      [ 5954.123979]  nf_log_bind_pf+0x2b/0x70
      [ 5954.123979]  nfulnl_recv_config+0xc0/0x4a0 [nfnetlink_log]
      [ 5954.123979]  nfnetlink_rcv_msg+0x12c/0x1b0 [nfnetlink]
      ...
      
      The problem goes back to v2.6.30-rc1~1372~1342~31 where nf_log_bind
      was decoupled from nf_log_register.
      
      Reported-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>,
        via irc.freenode.net/#netfilter
      Signed-off-by: NJan Engelhardt <jengelh@medozas.de>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      9ef0298a
  2. 20 8月, 2010 1 次提交
  3. 11 5月, 2010 1 次提交
  4. 09 4月, 2010 1 次提交
  5. 20 11月, 2009 1 次提交
    • P
      netfilter: nf_log: fix sleeping function called from invalid context in seq_show() · 6440fe05
      Patrick McHardy 提交于
      [  171.925285] BUG: sleeping function called from invalid context at kernel/mutex.c:280
      [  171.925296] in_atomic(): 1, irqs_disabled(): 0, pid: 671, name: grep
      [  171.925306] 2 locks held by grep/671:
      [  171.925312]  #0:  (&p->lock){+.+.+.}, at: [<c10b8acd>] seq_read+0x25/0x36c
      [  171.925340]  #1:  (rcu_read_lock){.+.+..}, at: [<c1391dac>] seq_start+0x0/0x44
      [  171.925372] Pid: 671, comm: grep Not tainted 2.6.31.6-4-netbook #3
      [  171.925380] Call Trace:
      [  171.925398]  [<c105104e>] ? __debug_show_held_locks+0x1e/0x20
      [  171.925414]  [<c10264ac>] __might_sleep+0xfb/0x102
      [  171.925430]  [<c1461521>] mutex_lock_nested+0x1c/0x2ad
      [  171.925444]  [<c1391c9e>] seq_show+0x74/0x127
      [  171.925456]  [<c10b8c5c>] seq_read+0x1b4/0x36c
      [  171.925469]  [<c10b8aa8>] ? seq_read+0x0/0x36c
      [  171.925483]  [<c10d5c8e>] proc_reg_read+0x60/0x74
      [  171.925496]  [<c10d5c2e>] ? proc_reg_read+0x0/0x74
      [  171.925510]  [<c10a4468>] vfs_read+0x87/0x110
      [  171.925523]  [<c10a458a>] sys_read+0x3b/0x60
      [  171.925538]  [<c1002a49>] syscall_call+0x7/0xb
      
      Fix it by replacing RCU with nf_log_mutex.
      Reported-by: N"Yin, Kangkai" <kangkai.yin@intel.com>
      Signed-off-by: NWu Fengguang <fengguang.wu@intel.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6440fe05
  6. 13 11月, 2009 1 次提交
    • W
      netfilter: nf_log: fix sleeping function called from invalid context in seq_show() · 7378396c
      Wu Fengguang 提交于
      [  171.925285] BUG: sleeping function called from invalid context at kernel/mutex.c:280
      [  171.925296] in_atomic(): 1, irqs_disabled(): 0, pid: 671, name: grep
      [  171.925306] 2 locks held by grep/671:
      [  171.925312]  #0:  (&p->lock){+.+.+.}, at: [<c10b8acd>] seq_read+0x25/0x36c
      [  171.925340]  #1:  (rcu_read_lock){.+.+..}, at: [<c1391dac>] seq_start+0x0/0x44
      [  171.925372] Pid: 671, comm: grep Not tainted 2.6.31.6-4-netbook #3
      [  171.925380] Call Trace:
      [  171.925398]  [<c105104e>] ? __debug_show_held_locks+0x1e/0x20
      [  171.925414]  [<c10264ac>] __might_sleep+0xfb/0x102
      [  171.925430]  [<c1461521>] mutex_lock_nested+0x1c/0x2ad
      [  171.925444]  [<c1391c9e>] seq_show+0x74/0x127
      [  171.925456]  [<c10b8c5c>] seq_read+0x1b4/0x36c
      [  171.925469]  [<c10b8aa8>] ? seq_read+0x0/0x36c
      [  171.925483]  [<c10d5c8e>] proc_reg_read+0x60/0x74
      [  171.925496]  [<c10d5c2e>] ? proc_reg_read+0x0/0x74
      [  171.925510]  [<c10a4468>] vfs_read+0x87/0x110
      [  171.925523]  [<c10a458a>] sys_read+0x3b/0x60
      [  171.925538]  [<c1002a49>] syscall_call+0x7/0xb
      
      Fix it by replacing RCU with nf_log_mutex.
      Reported-by: N"Yin, Kangkai" <kangkai.yin@intel.com>
      Signed-off-by: NWu Fengguang <fengguang.wu@intel.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      7378396c
  7. 12 11月, 2009 1 次提交
    • E
      sysctl net: Remove unused binary sysctl code · f8572d8f
      Eric W. Biederman 提交于
      Now that sys_sysctl is a compatiblity wrapper around /proc/sys
      all sysctl strategy routines, and all ctl_name and strategy
      entries in the sysctl tables are unused, and can be
      revmoed.
      
      In addition neigh_sysctl_register has been modified to no longer
      take a strategy argument and it's callers have been modified not
      to pass one.
      
      Cc: "David Miller" <davem@davemloft.net>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: netdev@vger.kernel.org
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      f8572d8f
  8. 24 9月, 2009 1 次提交
  9. 22 6月, 2009 1 次提交
  10. 13 6月, 2009 1 次提交
    • P
      netfilter: nf_log: fix sleeping function called from invalid context · 266d07cb
      Patrick McHardy 提交于
      Fix regression introduced by 17625274 "netfilter: sysctl support of
      logger choice":
      
      BUG: sleeping function called from invalid context at /mnt/s390test/linux-2.6-tip/arch/s390/include/asm/uaccess.h:234
      in_atomic(): 1, irqs_disabled(): 0, pid: 3245, name: sysctl
      CPU: 1 Not tainted 2.6.30-rc8-tipjun10-02053-g39ae214 #1
      Process sysctl (pid: 3245, task: 000000007f675da0, ksp: 000000007eb17cf0)
      0000000000000000 000000007eb17be8 0000000000000002 0000000000000000
             000000007eb17c88 000000007eb17c00 000000007eb17c00 0000000000048156
             00000000003e2de8 000000007f676118 000000007eb17f10 0000000000000000
             0000000000000000 000000007eb17be8 000000000000000d 000000007eb17c58
             00000000003e2050 000000000001635c 000000007eb17be8 000000007eb17c30
      Call Trace:
      (<00000000000162e6> show_trace+0x13a/0x148)
       <00000000000349ea> __might_sleep+0x13a/0x164
       <0000000000050300> proc_dostring+0x134/0x22c
       <0000000000312b70> nf_log_proc_dostring+0xfc/0x188
       <0000000000136f5e> proc_sys_call_handler+0xf6/0x118
       <0000000000136fda> proc_sys_read+0x26/0x34
       <00000000000d6e9c> vfs_read+0xac/0x158
       <00000000000d703e> SyS_read+0x56/0x88
       <0000000000027f42> sysc_noemu+0x10/0x16
      
      Use the nf_log_mutex instead of RCU to fix this.
      Reported-and-tested-by: NMaran Pakkirisamy <maranpsamy@in.ibm.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      266d07cb
  11. 15 4月, 2009 1 次提交
  12. 23 3月, 2009 1 次提交
    • E
      netfilter: sysctl support of logger choice · 17625274
      Eric Leblond 提交于
      This patchs adds support of modification of the used logger via sysctl.
      It can be used to change the logger to module that can not use the bind
      operation (ipt_LOG and ipt_ULOG). For this purpose, it creates a
      directory /proc/sys/net/netfilter/nf_log which contains a file
      per-protocol. The content of the file is the name current logger (NONE if
      not set) and a logger can be setup by simply echoing its name to the file.
      By echoing "NONE" to a /proc/sys/net/netfilter/nf_log/PROTO file, the
      logger corresponding to this PROTO is set to NULL.
      Signed-off-by: NEric Leblond <eric@inl.fr>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      17625274
  13. 16 3月, 2009 2 次提交
    • E
      netfilter: print the list of register loggers · c7a913cd
      Eric Leblond 提交于
      This patch modifies the proc output to add display of registered
      loggers. The content of /proc/net/netfilter/nf_log is modified. Instead
      of displaying a protocol per line with format:
      	proto:logger
      it now displays:
      	proto:logger (comma_separated_list_of_loggers)
      NONE is used as keyword if no logger is used.
      Signed-off-by: NEric Leblond <eric@inl.fr>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      c7a913cd
    • E
      netfilter: use a linked list of loggers · ca735b3a
      Eric Leblond 提交于
      This patch modifies nf_log to use a linked list of loggers for each
      protocol. This list of loggers is read and write protected with a
      mutex.
      
      This patch separates registration and binding. To be used as
      logging module, a module has to register calling nf_log_register()
      and to bind to a protocol it has to call nf_log_bind_pf().
      This patch also converts the logging modules to the new API. For nfnetlink_log,
      it simply switchs call to register functions to call to bind function and
      adds a call to nf_log_register() during init. For other modules, it just
      remove a const flag from the logger structure and replace it with a
      __read_mostly.
      Signed-off-by: NEric Leblond <eric@inl.fr>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      ca735b3a
  14. 08 10月, 2008 2 次提交
  15. 12 6月, 2008 1 次提交
  16. 28 3月, 2008 1 次提交
  17. 01 2月, 2008 1 次提交
    • E
      [NETFILTER]: Supress some sparse warnings · ca7c48ca
      Eric Dumazet 提交于
        CHECK   net/netfilter/nf_conntrack_expect.c
      net/netfilter/nf_conntrack_expect.c:429:13: warning: context imbalance in 'exp_seq_start' - wrong count at exit
      net/netfilter/nf_conntrack_expect.c:441:13: warning: context imbalance in 'exp_seq_stop' - unexpected unlock
        CHECK   net/netfilter/nf_log.c
      net/netfilter/nf_log.c:105:13: warning: context imbalance in 'seq_start' - wrong count at exit
      net/netfilter/nf_log.c:125:13: warning: context imbalance in 'seq_stop' - unexpected unlock
        CHECK   net/netfilter/nfnetlink_queue.c
      net/netfilter/nfnetlink_queue.c:363:7: warning: symbol 'size' shadows an earlier one
      net/netfilter/nfnetlink_queue.c:217:9: originally declared here
      net/netfilter/nfnetlink_queue.c:847:13: warning: context imbalance in 'seq_start' - wrong count at exit
      net/netfilter/nfnetlink_queue.c:859:13: warning: context imbalance in 'seq_stop' - unexpected unlock
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ca7c48ca
  18. 29 1月, 2008 3 次提交
  19. 19 7月, 2007 1 次提交
  20. 11 7月, 2007 1 次提交
  21. 13 2月, 2007 6 次提交
  22. 01 7月, 2006 1 次提交
  23. 30 8月, 2005 5 次提交