1. 01 8月, 2014 5 次提交
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · a173e550
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following patchset contains netfilter updates for net-next, they are:
      
      1) Add the reject expression for the nf_tables bridge family, this
         allows us to send explicit reject (TCP RST / ICMP dest unrech) to
         the packets matching a rule.
      
      2) Simplify and consolidate the nf_tables set dumping logic. This uses
         netlink control->data to filter out depending on the request.
      
      3) Perform garbage collection in xt_hashlimit using a workqueue instead
         of a timer, which is problematic when many entries are in place in
         the tables, from Eric Dumazet.
      
      4) Remove leftover code from the removed ulog target support, from
         Paul Bolle.
      
      5) Dump unmodified flags in the netfilter packet accounting when resetting
         counters, so userspace knows that a counter was in overquota situation,
         from Alexey Perevalov.
      
      6) Fix wrong usage of the bitwise functions in nfnetlink_acct, also from
         Alexey.
      
      7) Fix a crash when adding new set element with an empty NFTA_SET_ELEM_LIST
         attribute.
      
      This patchset also includes a couple of cleanups for xt_LED from
      Duan Jiong and for nf_conntrack_ipv4 (using coccinelle) from
      Himangi Saraogi.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a173e550
    • B
      tcp: don't require root to read tcp_metrics · 388070fa
      Banerjee, Debabrata 提交于
      commit d23ff701 (tcp: add generic netlink support for tcp_metrics) introduced
      netlink support for the new tcp_metrics, however it restricted getting of
      tcp_metrics to root user only. This is a change from how these values could
      have been fetched when in the old route cache. Unless there's a legitimate
      reason to restrict the reading of these values it would be better if normal
      users could fetch them.
      
      Cc: Julian Anastasov <ja@ssi.bg>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NDebabrata Banerjee <dbanerje@akamai.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      388070fa
    • D
      team: fix releasing uninitialized pointer to BPF prog · 2b391ee2
      Daniel Borkmann 提交于
      Commit 34c5bd66 introduced the possibility that an
      uninitialized pointer on the stack (orig_fp) can call into
      sk_unattached_filter_destroy() when its value is non NULL.
      
      Before that commit orig_fp was only destroyed in the same
      block where it was assigned a valid BPF prog before. Fix it
      up by initializing it to NULL.
      
      Fixes: 34c5bd66 ("net: filter: don't release unattached filter through call_rcu()")
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Cc: Pablo Neira <pablo@netfilter.org>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Cc: Jiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2b391ee2
    • P
      netfilter: nf_tables: check for unset NFTA_SET_ELEM_LIST_ELEMENTS attribute · 7d5570ca
      Pablo Neira Ayuso 提交于
      Otherwise, the kernel oopses in nla_for_each_nested when iterating over
      the unset attribute NFTA_SET_ELEM_LIST_ELEMENTS in the
      nf_tables_{new,del}setelem() path.
      
      netlink: 65524 bytes leftover after parsing attributes in process `nft'.
      [...]
      Oops: 0000 [#1] SMP
      [...]
      CPU: 2 PID: 6287 Comm: nft Not tainted 3.16.0-rc2+ #169
      RIP: 0010:[<ffffffffa0526e61>]  [<ffffffffa0526e61>] nf_tables_newsetelem+0x82/0xec [nf_tables]
      [...]
      Call Trace:
       [<ffffffffa05178c4>] nfnetlink_rcv+0x2e7/0x3d7 [nfnetlink]
       [<ffffffffa0517939>] ? nfnetlink_rcv+0x35c/0x3d7 [nfnetlink]
       [<ffffffff8137d300>] netlink_unicast+0xf8/0x17a
       [<ffffffff8137d6a5>] netlink_sendmsg+0x323/0x351
      [...]
      
      Fix this by returning -EINVAL if this attribute is not set, which
      doesn't make sense at all since those commands are there to add and to
      delete elements from the set.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      7d5570ca
    • A
      netfilter: nfnetlink_acct: avoid using NFACCT_F_OVERQUOTA with bit helper functions · b6d04688
      Alexey Perevalov 提交于
      Bit helper functions were used for manipulation with NFACCT_F_OVERQUOTA,
      but they are accepting pit position, but not a bit mask. As a result
      not a third bit for NFACCT_F_OVERQUOTA was set, but forth. Such
      behaviour was dangarous and could lead to unexpected overquota report
      result.
      Signed-off-by: NAlexey Perevalov <a.perevalov@samsung.com>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      b6d04688
  2. 31 7月, 2014 32 次提交
  3. 30 7月, 2014 3 次提交
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · d8772157
      Linus Torvalds 提交于
      Pull KVM fix from Paolo Bonzini:
       "Fix a bug which allows KVM guests to bring down the entire system on
        some 64K enabled ARM64 hosts"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        kvm: arm64: vgic: fix hyp panic with 64k pages on juno platform
      d8772157
    • L
      Revert "cdc_subset: deal with a device that needs reset for timeout" · 1d8fcba1
      Linus Torvalds 提交于
      This reverts commit 20fbe3ae.
      
      As reported by Stephen Rothwell, it causes compile failures in certain
      configurations:
      
        drivers/net/usb/cdc_subset.c:360:15: error: 'dummy_prereset' undeclared here (not in a function)
          .pre_reset = dummy_prereset,
                       ^
        drivers/net/usb/cdc_subset.c:361:16: error: 'dummy_postreset' undeclared here (not in a function)
          .post_reset = dummy_postreset,
                        ^
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Acked-by: NDavid Miller <davem@davemloft.net>
      Cc: Oliver Neukum <oneukum@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1d8fcba1
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · b527caee
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Make fragmentation IDs less predictable, from Eric Dumazet.
      
       2) TSO tunneling can crash in bnx2x driver, fix from Dmitry Kravkov.
      
       3) Don't allow NULL msg->msg_name just because msg->msg_namelen is
          non-zero, from Andrey Ryabinin.
      
       4) ndm->ndm_type set using wrong macros, from Jun Zhao.
      
       5) cdc-ether devices can come up with entries in their address filter,
          so explicitly clear the filter after the device initializes.  From
          Oliver Neukum.
      
       6) Forgotten refcount bump in xfrm_lookup(), from Steffen Klassert.
      
       7) Short packets not padded properly, exposing random data, in bcmgenet
          driver.  Fix from Florian Fainelli.
      
       8) xgbe_probe() doesn't return an error code, but rather zero, when
          netif_set_real_num_tx_queues() fails.  Fix from Wei Yongjun.
      
       9) USB speed not probed properly in r8152 driver, from Hayes Wang.
      
      10) Transmit logic choosing the outgoing port in the sunvnet driver
          needs to consider a) is the port actually up and b) whether it is a
          switch port.  Fix from David L Stevens.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits)
        net: phy: re-apply PHY fixups during phy_register_device
        cdc-ether: clean packet filter upon probe
        cdc_subset: deal with a device that needs reset for timeout
        net: sendmsg: fix NULL pointer dereference
        isdn/bas_gigaset: fix a leak on failure path in gigaset_probe()
        ip: make IP identifiers less predictable
        neighbour : fix ndm_type type error issue
        sunvnet: only use connected ports when sending
        can: c_can_platform: Fix raminit, use devm_ioremap() instead of devm_ioremap_resource()
        bnx2x: fix crash during TSO tunneling
        r8152: fix the checking of the usb speed
        net: phy: Ensure the MDIO bus module is held
        net: phy: Set the driver when registering an MDIO bus device
        bnx2x: fix set_setting for some PHYs
        hyperv: Fix error return code in netvsc_init_buf()
        amd-xgbe: Fix error return code in xgbe_probe()
        ath9k: fix aggregation session lockup
        net: bcmgenet: correctly pad short packets
        net: sctp: inherit auth_capable on INIT collisions
        mac80211: fix crash on getting sta info with uninitialized rate control
        ...
      b527caee