1. 18 6月, 2009 2 次提交
  2. 09 6月, 2009 1 次提交
  3. 02 6月, 2009 1 次提交
  4. 28 5月, 2009 2 次提交
  5. 27 5月, 2009 5 次提交
  6. 26 5月, 2009 1 次提交
  7. 25 5月, 2009 2 次提交
    • P
      netfilter: nf_ct_dccp: add missing DCCP protocol changes in event cache · b38b1f61
      Pablo Neira Ayuso 提交于
      This patch adds the missing protocol state-change event reporting
      for DCCP.
      
      $ sudo conntrack -E
          [NEW] dccp     33 240 src=192.168.0.2 dst=192.168.1.2 sport=57040 dport=5001 [UNREPLIED] src=192.168.1.2 dst=192.168.1.100 sport=5001 dport=57040
      
      With this patch:
      
      $ sudo conntrack -E
          [NEW] dccp     33 240 REQUEST src=192.168.0.2 dst=192.168.1.2 sport=57040 dport=5001 [UNREPLIED] src=192.168.1.2 dst=192.168.1.100 sport=5001 dport=57040
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      b38b1f61
    • J
      netfilter: nf_ct_tcp: fix accepting invalid RST segments · bfcaa502
      Jozsef Kadlecsik 提交于
      Robert L Mathews discovered that some clients send evil TCP RST segments,
      which are accepted by netfilter conntrack but discarded by the
      destination. Thus the conntrack entry is destroyed but the destination
      retransmits data until timeout.
      
      The same technique, i.e. sending properly crafted RST segments, can easily
      be used to bypass connlimit/connbytes based restrictions (the sample
      script written by Robert can be found in the netfilter mailing list
      archives).
      
      The patch below adds a new flag and new field to struct ip_ct_tcp_state so
      that checking RST segments can be made more strict and thus TCP conntrack
      can catch the invalid ones: the RST segment is accepted only if its
      sequence number higher than or equal to the highest ack we seen from the
      other direction. (The last_ack field cannot be reused because it is used
      to catch resent packets.)
      Signed-off-by: NJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      bfcaa502
  8. 22 5月, 2009 3 次提交
  9. 21 5月, 2009 5 次提交
    • J
      IPv6: set RTPROT_KERNEL to initial route · 4f724279
      Jean-Mickael Guerin 提交于
      The use of unspecified protocol in IPv6 initial route prevents quagga to
      install IPv6 default route:
      # show ipv6 route
      S   ::/0 [1/0] via fe80::1, eth1_0
      K>* ::/0 is directly connected, lo, rej
      C>* ::1/128 is directly connected, lo
      C>* fe80::/64 is directly connected, eth1_0
      
      # ip -6 route
      fe80::/64 dev eth1_0  proto kernel  metric 256  mtu 1500 advmss 1440
      hoplimit -1
      ff00::/8 dev eth1_0  metric 256  mtu 1500 advmss 1440 hoplimit -1
      unreachable default dev lo  proto none  metric -1  error -101 hoplimit 255
      
      The attached patch ensures RTPROT_KERNEL to the default initial route
      and fixes the problem for quagga.
      This is similar to "ipv6: protocol for address routes"
      f410a1fb.
      
      # show ipv6 route
      S>* ::/0 [1/0] via fe80::1, eth1_0
      C>* ::1/128 is directly connected, lo
      C>* fe80::/64 is directly connected, eth1_0
      
      # ip -6 route
      fe80::/64 dev eth1_0  proto kernel  metric 256  mtu 1500 advmss 1440
      hoplimit -1
      fe80::/64 dev eth1_0  proto kernel  metric 256  mtu 1500 advmss 1440
      hoplimit -1
      ff00::/8 dev eth1_0  metric 256  mtu 1500 advmss 1440 hoplimit -1
      default via fe80::1 dev eth1_0  proto zebra  metric 1024  mtu 1500
      advmss 1440 hoplimit -1
      unreachable default dev lo  proto kernel  metric -1  error -101 hoplimit 255
      Signed-off-by: NJean-Mickael Guerin <jean-mickael.guerin@6wind.com>
      Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4f724279
    • E
      net: fix rtable leak in net/ipv4/route.c · 1ddbcb00
      Eric Dumazet 提交于
      Alexander V. Lukyanov found a regression in 2.6.29 and made a complete
      analysis found in http://bugzilla.kernel.org/show_bug.cgi?id=13339
      Quoted here because its a perfect one :
      
      begin_of_quotation
       2.6.29 patch has introduced flexible route cache rebuilding. Unfortunately the
       patch has at least one critical flaw, and another problem.
      
       rt_intern_hash calculates rthi pointer, which is later used for new entry
       insertion. The same loop calculates cand pointer which is used to clean the
       list. If the pointers are the same, rtable leak occurs, as first the cand is
       removed then the new entry is appended to it.
      
       This leak leads to unregister_netdevice problem (usage count > 0).
      
       Another problem of the patch is that it tries to insert the entries in certain
       order, to facilitate counting of entries distinct by all but QoS parameters.
       Unfortunately, referencing an existing rtable entry moves it to list beginning,
       to speed up further lookups, so the carefully built order is destroyed.
      
       For the first problem the simplest patch it to set rthi=0 when rthi==cand, but
       it will also destroy the ordering.
      end_of_quotation
      
      Problematic commit is 1080d709
      (net: implement emergency route cache rebulds when gc_elasticity is exceeded)
      
      Trying to keep dst_entries ordered is too complex and breaks the fact that
      order should depend on the frequency of use for garbage collection.
      
      A possible fix is to make rt_intern_hash() simpler, and only makes
      rt_check_expire() a litle bit smarter, being able to cope with an arbitrary
      entries order. The added loop is running on cache hot data, while cpu
      is prefetching next object, so should be unnoticied.
      Reported-and-analyzed-by: NAlexander V. Lukyanov <lav@yar.ru>
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ddbcb00
    • E
      net: fix length computation in rt_check_expire() · cf8da764
      Eric Dumazet 提交于
      rt_check_expire() computes average and standard deviation of chain lengths,
      but not correclty reset length to 0 at beginning of each chain.
      This probably gives overflows for sum2 (and sum) on loaded machines instead
      of meaningful results.
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cf8da764
    • L
      cfg80211: fix race between core hint and driver's custom apply · 5078b2e3
      Luis R. Rodriguez 提交于
      Its possible for cfg80211 to have scheduled the work and for
      the global workqueue to not have kicked in prior to a cfg80211
      driver's regulatory hint or wiphy_apply_custom_regulatory().
      
      Although this is very unlikely its possible and should fix
      this race. When this race would happen you are expected to have
      hit a null pointer dereference panic.
      
      Cc: stable@kernel.org
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Tested-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      5078b2e3
    • J
      wext: verify buffer size for SIOCSIWENCODEEXT · 88f16db7
      Johannes Berg 提交于
      Another design flaw in wireless extensions (is anybody
      surprised?) in the way it handles the iw_encode_ext
      structure: The structure is part of the 'extra' memory
      but contains the key length explicitly, instead of it
      just being the length of the extra buffer - size of
      the struct and using the explicit key length only for
      the get operation (which only writes it).
      
      Therefore, we have this layout:
      
      extra: +-------------------------+
             | struct iw_encode_ext  { |
             |     ...                 |
             |     u16 key_len;        |
             |     u8 key[0];          |
             | };                      |
             +-------------------------+
             | key material            |
             +-------------------------+
      
      Now, all drivers I checked use ext->key_len without
      checking that both key_len and the struct fit into the
      extra buffer that has been copied from userspace. This
      leads to a buffer overrun while reading that buffer,
      depending on the driver it may be possible to specify
      arbitrary key_len or it may need to be a proper length
      for the key algorithm specified.
      
      Thankfully, this is only exploitable by root, but root
      can actually cause a segfault or use kernel memory as
      a key (which you can even get back with siocgiwencode
      or siocgiwencodeext from the key buffer).
      
      Fix this by verifying that key_len fits into the buffer
      along with struct iw_encode_ext.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      88f16db7
  10. 19 5月, 2009 5 次提交
  11. 18 5月, 2009 4 次提交
  12. 12 5月, 2009 1 次提交
  13. 10 5月, 2009 3 次提交
    • M
      Bluetooth: Don't trigger disconnect timeout for security mode 3 pairing · 3d7a9d1c
      Marcel Holtmann 提交于
      A remote device in security mode 3 that tries to connect will require
      the pairing during the connection setup phase. The disconnect timeout
      is now triggered within 10 milliseconds and causes the pairing to fail.
      
      If a connection is not fully established and a PIN code request is
      received, don't trigger the disconnect timeout. The either successful
      or failing connection complete event will make sure that the timeout
      is triggered at the right time.
      
      The biggest problem with security mode 3 is that many Bluetooth 2.0
      device and before use a temporary security mode 3 for dedicated
      bonding.
      
      Based on a report by Johan Hedberg <johan.hedberg@nokia.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Tested-by: NJohan Hedberg <johan.hedberg@nokia.com>
      3d7a9d1c
    • M
      Bluetooth: Don't use hci_acl_connect_cancel() for incoming connections · 1b0336bb
      Marcel Holtmann 提交于
      The connection setup phase takes around 2 seconds or longer and in
      that time it is possible that the need for an ACL connection is no
      longer present. If that happens then, the connection attempt will
      be canceled.
      
      This only applies to outgoing connections, but currently it can also
      be triggered by incoming connection. Don't call hci_acl_connect_cancel()
      on incoming connection since these have to be either accepted or rejected
      in this state. Once they are successfully connected they need to be
      fully disconnected anyway.
      
      Also remove the wrong hci_acl_disconn() call for SCO and eSCO links
      since at this stage they can't be disconnected either, because the
      connection handle is still unknown.
      
      Based on a report by Johan Hedberg <johan.hedberg@nokia.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Tested-by: NJohan Hedberg <johan.hedberg@nokia.com>
      1b0336bb
    • M
      Bluetooth: Fix wrong module refcount when connection setup fails · 384943ec
      Marcel Holtmann 提交于
      The module refcount is increased by hci_dev_hold() call in hci_conn_add()
      and decreased by hci_dev_put() call in del_conn(). In case the connection
      setup fails, hci_dev_put() is never called.
      
      Procedure to reproduce the issue:
      
        # hciconfig hci0 up
        # lsmod | grep btusb                   -> "used by" refcount = 1
      
        # hcitool cc <non-exisiting bdaddr>    -> will get timeout
      
        # lsmod | grep btusb                   -> "used by" refcount = 2
        # hciconfig hci0 down
        # lsmod | grep btusb                   -> "used by" refcount = 1
        # rmmod btusb                          -> ERROR: Module btusb is in use
      
      The hci_dev_put() call got moved into del_conn() with the 2.6.25 kernel
      to fix an issue with hci_dev going away before hci_conn. However that
      change was wrong and introduced this problem.
      
      When calling hci_conn_del() it has to call hci_dev_put() after freeing
      the connection details. This handling should be fully symmetric. The
      execution of del_conn() is done in a work queue and needs it own calls
      to hci_dev_hold() and hci_dev_put() to ensure that the hci_dev stays
      until the connection cleanup has been finished.
      
      Based on a report by Bing Zhao <bzhao@marvell.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Tested-by: NBing Zhao <bzhao@marvell.com>
      384943ec
  14. 09 5月, 2009 2 次提交
    • S
      ipvs: Fix IPv4 FWMARK virtual services · be8be9ec
      Simon Horman 提交于
      This fixes the use of fwmarks to denote IPv4 virtual services
      which was unfortunately broken as a result of the integration
      of IPv6 support into IPVS, which was included in 2.6.28.
      
      The problem arises because fwmarks are stored in the 4th octet
      of a union nf_inet_addr .all, however in the case of IPv4 only
      the first octet, corresponding to .ip, is assigned and compared.
      
      In other words, using .all = { 0, 0, 0, htonl(svc->fwmark) always
      results in a value of 0 (32bits) being stored for IPv4. This means
      that one fwmark can be used, as it ends up being mapped to 0, but things
      break down when multiple fwmarks are used, as they all end up being mapped
      to 0.
      
      As fwmarks are 32bits a reasonable fix seems to be to just store the fwmark
      in .ip, and comparing and storing .ip when fwmarks are used.
      
      This patch makes the assumption that in calls to ip_vs_ct_in_get()
      and ip_vs_sched_persist() if the proto parameter is IPPROTO_IP then
      we are dealing with an fwmark. I believe this is valid as ip_vs_in()
      does fairly strict filtering on the protocol and IPPROTO_IP should
      not be used in these calls unless explicitly passed when making
      these calls for fwmarks in ip_vs_sched_persist().
      Tested-by: NFabien Duchêne <fabien.duchene@student.uclouvain.be>
      Cc: Joseph Mack NA3T <jmack@wm7d.net>
      Cc: Julius Volz <julius.volz@gmail.com>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      be8be9ec
    • D
      ipv4: Make INET_LRO a bool instead of tristate. · e81963b1
      David S. Miller 提交于
      This code is used as a library by several device drivers,
      which select INET_LRO.
      
      If some are modules and some are statically built into the
      kernel, we get build failures if INET_LRO is modular.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e81963b1
  15. 08 5月, 2009 1 次提交
  16. 07 5月, 2009 2 次提交