1. 20 10月, 2016 1 次提交
  2. 19 10月, 2016 1 次提交
  3. 18 10月, 2016 7 次提交
  4. 17 10月, 2016 3 次提交
  5. 16 10月, 2016 2 次提交
  6. 14 10月, 2016 8 次提交
  7. 13 10月, 2016 11 次提交
    • E
      ipv6: tcp: restore IP6CB for pktoptions skbs · 8ce48623
      Eric Dumazet 提交于
      Baozeng Ding reported following KASAN splat :
      
      BUG: KASAN: use-after-free in ip6_datagram_recv_specific_ctl+0x13f1/0x15c0 at addr ffff880029c84ec8
      Read of size 1 by task poc/25548
      Call Trace:
       [<ffffffff82cf43c9>] dump_stack+0x12e/0x185 /lib/dump_stack.c:15
       [<     inline     >] print_address_description /mm/kasan/report.c:204
       [<ffffffff817ced3b>] kasan_report_error+0x48b/0x4b0 /mm/kasan/report.c:283
       [<     inline     >] kasan_report /mm/kasan/report.c:303
       [<ffffffff817ced9e>] __asan_report_load1_noabort+0x3e/0x40 /mm/kasan/report.c:321
       [<ffffffff85c71da1>] ip6_datagram_recv_specific_ctl+0x13f1/0x15c0 /net/ipv6/datagram.c:687
       [<ffffffff85c734c3>] ip6_datagram_recv_ctl+0x33/0x40
       [<ffffffff85c0b07c>] do_ipv6_getsockopt.isra.4+0xaec/0x2150
       [<ffffffff85c0c7f6>] ipv6_getsockopt+0x116/0x230
       [<ffffffff859b5a12>] tcp_getsockopt+0x82/0xd0 /net/ipv4/tcp.c:3035
       [<ffffffff855fb385>] sock_common_getsockopt+0x95/0xd0 /net/core/sock.c:2647
       [<     inline     >] SYSC_getsockopt /net/socket.c:1776
       [<ffffffff855f8ba2>] SyS_getsockopt+0x142/0x230 /net/socket.c:1758
       [<ffffffff8685cdc5>] entry_SYSCALL_64_fastpath+0x23/0xc6
      Memory state around the buggy address:
       ffff880029c84d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
       ffff880029c84e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
      > ffff880029c84e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                                    ^
       ffff880029c84f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
       ffff880029c84f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
      
      He also provided a syzkaller reproducer.
      
      Issue is that ip6_datagram_recv_specific_ctl() expects to find IP6CB
      data that was moved at a different place in tcp_v6_rcv()
      
      This patch moves tcp_v6_restore_cb() up and calls it from
      tcp_v6_do_rcv() when np->pktoptions is set.
      
      Fixes: 971f10ec ("tcp: better TCP_SKB_CB layout to reduce cache line misses")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Reported-by: NBaozeng Ding <sploving1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8ce48623
    • R
      bridge: add address and vlan to fdb warning messages · de1dfeef
      Roopa Prabhu 提交于
      This patch adds vlan and address to warning messages printed
      in the bridge fdb code for debuggability.
      Signed-off-by: NRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de1dfeef
    • W
      net_sched: reorder pernet ops and act ops registrations · ab102b80
      WANG Cong 提交于
      Krister reported a kernel NULL pointer dereference after
      tcf_action_init_1() invokes a_o->init(), it is a race condition
      where one thread calling tcf_register_action() to initialize
      the netns data after putting act ops in the global list and
      the other thread searching the list and then calling
      a_o->init(net, ...).
      
      Fix this by moving the pernet ops registration before making
      the action ops visible. This is fine because: a) we don't
      rely on act_base in pernet ops->init(), b) in the worst case we
      have a fully initialized netns but ops is still not ready so
      new actions still can't be created.
      Reported-by: NKrister Johansen <kjlx@templeofstupid.com>
      Tested-by: NKrister Johansen <kjlx@templeofstupid.com>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Acked-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab102b80
    • J
      openvswitch: add NETIF_F_HW_VLAN_STAG_TX to internal dev · 3145c037
      Jiri Benc 提交于
      The internal device does support 802.1AD offloading since 018c1dda
      ("openvswitch: 802.1AD Flow handling, actions, vlan parsing, netlink
      attributes").
      Signed-off-by: NJiri Benc <jbenc@redhat.com>
      Acked-by: NPravin B Shelar <pshelar@ovn.org>
      Acked-by: NEric Garver <e@erig.me>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3145c037
    • J
      openvswitch: fix vlan subtraction from packet length · 72ec108d
      Jiri Benc 提交于
      When the packet has its vlan tag in skb->vlan_tci, the length of the VLAN
      header is not counted in skb->len. It doesn't make sense to subtract it.
      
      Fixes: 018c1dda ("openvswitch: 802.1AD Flow handling, actions, vlan parsing, netlink attributes")
      Signed-off-by: NJiri Benc <jbenc@redhat.com>
      Acked-by: NPravin B Shelar <pshelar@ovn.org>
      Acked-by: NEric Garver <e@erig.me>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      72ec108d
    • J
      openvswitch: vlan: remove wrong likely statement · 20ecf1e4
      Jiri Benc 提交于
      This code is called whenever flow key is being extracted from the packet.
      The packet may be as likely vlan tagged as not.
      
      Fixes: 018c1dda ("openvswitch: 802.1AD Flow handling, actions, vlan parsing, netlink attributes")
      Signed-off-by: NJiri Benc <jbenc@redhat.com>
      Acked-by: NPravin B Shelar <pshelar@ovn.org>
      Acked-by: NEric Garver <e@erig.me>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      20ecf1e4
    • E
      net_sched: do not broadcast RTM_GETTFILTER result · fa59b27c
      Eric Dumazet 提交于
      There are two ways to get tc filters from kernel to user space.
      
      1) Full dump (tc_dump_tfilter())
      2) RTM_GETTFILTER to get one precise filter, reducing overhead.
      
      The second operation is unfortunately broadcasting its result,
      polluting "tc monitor" users.
      
      This patch makes sure only the requester gets the result, using
      netlink_unicast() instead of rtnetlink_send()
      
      Jamal cooked an iproute2 patch to implement "tc filter get" operation,
      but other user space libraries already use RTM_GETTFILTER when a single
      filter is queried, instead of dumping all filters.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Acked-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fa59b27c
    • X
      sctp: remove the old ttl expires policy · 8ae808eb
      Xin Long 提交于
      The prsctp polices include ttl expires policy already, we should remove
      the old ttl expires codes, and just adjust the new polices' codes to be
      compatible with the old one for users.
      
      This patch is to remove all the old expires codes, and if prsctp polices
      are not set, it will still set msg's expires_at and check the expires in
      sctp_check_abandoned.
      
      Note that asoc->prsctp_enable is set by default, so users can't feel any
      difference even if they use the old expires api in userspace.
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Acked-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8ae808eb
    • X
      sctp: reuse sent_count to avoid retransmitted chunks for RTT measurements · cc6ac9bc
      Xin Long 提交于
      Now sctp uses chunk->resent to record if a chunk is retransmitted, for
      RTT measurements with retransmitted DATA chunks. chunk->sent_count was
      introduced to record how many times one chunk has been sent for prsctp
      RTX policy before. We actually can know if one chunk is retransmitted
      by checking chunk->sent_count is greater than 1.
      
      This patch is to remove resent from sctp_chunk and reuse sent_count
      to avoid retransmitted chunks for RTT measurements.
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Acked-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cc6ac9bc
    • J
      net: deprecate eth_change_mtu, remove usage · a52ad514
      Jarod Wilson 提交于
      With centralized MTU checking, there's nothing productive done by
      eth_change_mtu that isn't already done in dev_set_mtu, so mark it as
      deprecated and remove all usage of it in the kernel. All callers have been
      audited for calls to alloc_etherdev* or ether_setup directly, which means
      they all have a valid dev->min_mtu and dev->max_mtu. Now eth_change_mtu
      prints out a netdev_warn about being deprecated, for the benefit of
      out-of-tree drivers that might be utilizing it.
      
      Of note, dvb_net.c actually had dev->mtu = 4096, while using
      eth_change_mtu, meaning that if you ever tried changing it's mtu, you
      couldn't set it above 1500 anymore. It's now getting dev->max_mtu also set
      to 4096 to remedy that.
      
      v2: fix up lantiq_etop, missed breakage due to drive not compiling on x86
      
      CC: netdev@vger.kernel.org
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a52ad514
    • J
      net: centralize net_device min/max MTU checking · 61e84623
      Jarod Wilson 提交于
      While looking into an MTU issue with sfc, I started noticing that almost
      every NIC driver with an ndo_change_mtu function implemented almost
      exactly the same range checks, and in many cases, that was the only
      practical thing their ndo_change_mtu function was doing. Quite a few
      drivers have either 68, 64, 60 or 46 as their minimum MTU value checked,
      and then various sizes from 1500 to 65535 for their maximum MTU value. We
      can remove a whole lot of redundant code here if we simple store min_mtu
      and max_mtu in net_device, and check against those in net/core/dev.c's
      dev_set_mtu().
      
      In theory, there should be zero functional change with this patch, it just
      puts the infrastructure in place. Subsequent patches will attempt to start
      using said infrastructure, with theoretically zero change in
      functionality.
      
      CC: netdev@vger.kernel.org
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      61e84623
  8. 12 10月, 2016 6 次提交
  9. 11 10月, 2016 1 次提交