12 Sep, 2014

1 commit

  • Pull Ceph fixes from Sage Weil:
    "The main thing here is a set of three patches that fix a buffer
    overrun for large authentication tickets (sigh).

    There is also a trivial warning fix and an error path fix that are
    both regressions"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
    libceph: do not hard code max auth ticket len
    libceph: add process_one_ticket() helper
    libceph: gracefully handle large reply messages from the mon
    rbd: fix error return code in rbd_dev_device_setup()
    rbd: avoid format-security warning inside alloc_workqueue()

    Linus Torvalds
     

11 Sep, 2014

3 commits

  • We hard code cephx auth ticket buffer size to 256 bytes. This isn't
    enough for any moderate setups and, in case tickets themselves are not
    encrypted, leads to buffer overflows (ceph_x_decrypt() errors out, but
    ceph_decode_copy() doesn't - it's just a memcpy() wrapper). Since the
    buffer is allocated dynamically anyway, allocated it a bit later, at
    the point where we know how much is going to be needed.

    Fixes: http://tracker.ceph.com/issues/8979

    Cc: stable@vger.kernel.org
    Signed-off-by: Ilya Dryomov
    Reviewed-by: Sage Weil

    Ilya Dryomov
     
  • Add a helper for processing individual cephx auth tickets. Needed for
    the next commit, which deals with allocating ticket buffers. (Most of
    the diff here is whitespace - view with git diff -b).

    Cc: stable@vger.kernel.org
    Signed-off-by: Ilya Dryomov
    Reviewed-by: Sage Weil

    Ilya Dryomov
     
  • We preallocate a few of the message types we get back from the mon. If we
    get a larger message than we are expecting, fall back to trying to allocate
    a new one instead of blindly using the one we have.

    CC: stable@vger.kernel.org
    Signed-off-by: Sage Weil
    Reviewed-by: Ilya Dryomov

    Sage Weil
     

08 Sep, 2014

2 commits

  • John W. Linville says:

    ====================
    pull request: wireless 2014-09-05

    Please pull this batch of fixes intended for the 3.17 stream...

    For the mac80211 bits, Johannes says:

    "Here are a few fixes for mac80211. One has been discussed for a while
    and adds a terminating NUL-byte to the alpha2 sent to userspace, which
    shouldn't be necessary but since many places treat it as a string we
    couldn't move to just sending two bytes.

    In addition to that, we have two VLAN fixes from Felix, a mesh fix, a
    fix for the recently introduced RX aggregation offload, a revert for
    a broken patch (that luckily didn't really cause any harm) and a small
    fix for alignment in debugfs."

    For the iwlwifi bits, Emmanuel says:

    "I revert a patch that disabled CTS to self in dvm because users
    reported issues. The revert is CCed to stable since the offending
    patch was sent to stable too. I also bump the firmware API versions
    since a new firmware is coming up. On top of that, Marcel fixes a
    bug I introduced while fixing a bug in our Kconfig file."

    Please let me know if there are problems!
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • It is possible that the interface is already gone after joining
    the list of anycast on this interface as we don't hold a refcount
    for the device, in this case we are safe to ignore the error.

    What's more important, for API compatibility we should not
    change this behavior for applications even if it were correct.

    Fixes: commit a9ed4a2986e13011 ("ipv6: fix rtnl locking in setsockopt for anycast and multicast")
    Cc: Sabrina Dubroca
    Cc: David S. Miller
    Signed-off-by: Cong Wang
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    WANG Cong
     

06 Sep, 2014

7 commits

  • This patch fix spelling typo found in DocBook/networking.xml.
    It is because the neworking.xml is generated from comments
    in the source, I have to fix typo in comments within the source.

    Signed-off-by: Masanari Iida
    Acked-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Masanari Iida
     
  • Paul Bolle reports that 'select NETFILTER_XT_NAT' from the IPV4 and IPV6
    NAT tables becomes noop since there is no Kconfig switch for it. Add the
    Kconfig switch to resolve this problem.

    Fixes: 8993cf8 netfilter: move NAT Kconfig switches out of the iptables scope
    Reported-by: Paul Bolle
    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: David S. Miller

    Pablo Neira Ayuso
     
  • addrconf_get_prefix_route() ensures to get the right route in the right table.

    Signed-off-by: Nicolas Dichtel
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Nicolas Dichtel
     
  • There is no reason to take a refcnt before deleting the peer address route.
    It's done some lines below for the local prefix route because
    inet6_ifa_finish_destroy() will release it at the end.
    For the peer address route, we want to free it right now.

    This bug has been introduced by commit
    caeaba79009c ("ipv6: add support of peer address").

    Signed-off-by: Nicolas Dichtel
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Nicolas Dichtel
     
  • The timestamping API has separate bits for generating and reporting
    timestamps. A software timestamp should only be reported for a packet
    when the packet has the relevant generation flag (SKBTX_..) set
    and the socket has reporting bit SOF_TIMESTAMPING_SOFTWARE set.

    The second check was accidentally removed. Reinstitute the original
    behavior.

    Tested:
    Without this patch, Documentation/networking/txtimestamp reports
    timestamps regardless of whether SOF_TIMESTAMPING_SOFTWARE is set.
    After the patch, it only reports them when the flag is set.

    Fixes: f24b9be5957b ("net-timestamp: extend SCM_TIMESTAMPING ancillary data struct")
    Signed-off-by: Willem de Bruijn
    Signed-off-by: David S. Miller

    Willem de Bruijn
     
  • Use dst_entry held by sk_dst_get() to retrieve tunnel's PMTU.

    The dst_mtu(__sk_dst_get(tunnel->sock)) call was racy. __sk_dst_get()
    could return NULL if tunnel->sock->sk_dst_cache was reset just before the
    call, thus making dst_mtu() dereference a NULL pointer:

    [ 1937.661598] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
    [ 1937.664005] IP: [] pppol2tp_connect+0x33d/0x41e [l2tp_ppp]
    [ 1937.664005] PGD daf0c067 PUD d9f93067 PMD 0
    [ 1937.664005] Oops: 0000 [#1] SMP
    [ 1937.664005] Modules linked in: l2tp_ppp l2tp_netlink l2tp_core ip6table_filter ip6_tables iptable_filter ip_tables ebtable_nat ebtables x_tables udp_tunnel pppoe pppox ppp_generic slhc deflate ctr twofish_generic twofish_x86_64_3way xts lrw gf128mul glue_helper twofish_x86_64 twofish_common blowfish_generic blowfish_x86_64 blowfish_common des_generic cbc xcbc rmd160 sha512_generic hmac crypto_null af_key xfrm_algo 8021q garp bridge stp llc tun atmtcp clip atm ext3 mbcache jbd iTCO_wdt coretemp kvm_intel iTCO_vendor_support kvm pcspkr evdev ehci_pci lpc_ich mfd_core i5400_edac edac_core i5k_amb shpchp button processor thermal_sys xfs crc32c_generic libcrc32c dm_mod usbhid sg hid sr_mod sd_mod cdrom crc_t10dif crct10dif_common ata_generic ahci ata_piix tg3 libahci libata uhci_hcd ptp ehci_hcd pps_core usbcore scsi_mod libphy usb_common [last unloaded: l2tp_core]
    [ 1937.664005] CPU: 0 PID: 10022 Comm: l2tpstress Tainted: G O 3.17.0-rc1 #1
    [ 1937.664005] Hardware name: HP ProLiant DL160 G5, BIOS O12 08/22/2008
    [ 1937.664005] task: ffff8800d8fda790 ti: ffff8800c43c4000 task.ti: ffff8800c43c4000
    [ 1937.664005] RIP: 0010:[] [] pppol2tp_connect+0x33d/0x41e [l2tp_ppp]
    [ 1937.664005] RSP: 0018:ffff8800c43c7de8 EFLAGS: 00010282
    [ 1937.664005] RAX: ffff8800da8a7240 RBX: ffff8800d8c64600 RCX: 000001c325a137b5
    [ 1937.664005] RDX: 8c6318c6318c6320 RSI: 000000000000010c RDI: 0000000000000000
    [ 1937.664005] RBP: ffff8800c43c7ea8 R08: 0000000000000000 R09: 0000000000000000
    [ 1937.664005] R10: ffffffffa048e2c0 R11: ffff8800d8c64600 R12: ffff8800ca7a5000
    [ 1937.664005] R13: ffff8800c439bf40 R14: 000000000000000c R15: 0000000000000009
    [ 1937.664005] FS: 00007fd7f610f700(0000) GS:ffff88011a600000(0000) knlGS:0000000000000000
    [ 1937.664005] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    [ 1937.664005] CR2: 0000000000000020 CR3: 00000000d9d75000 CR4: 00000000000027e0
    [ 1937.664005] Stack:
    [ 1937.664005] ffffffffa049da80 ffff8800d8fda790 000000000000005b ffff880000000009
    [ 1937.664005] ffff8800daf3f200 0000000000000003 ffff8800c43c7e48 ffffffff81109b57
    [ 1937.664005] ffffffff81109b0e ffffffff8114c566 0000000000000000 0000000000000000
    [ 1937.664005] Call Trace:
    [ 1937.664005] [] ? pppol2tp_connect+0x235/0x41e [l2tp_ppp]
    [ 1937.664005] [] ? might_fault+0x9e/0xa5
    [ 1937.664005] [] ? might_fault+0x55/0xa5
    [ 1937.664005] [] ? rcu_read_unlock+0x1c/0x26
    [ 1937.664005] [] SYSC_connect+0x87/0xb1
    [ 1937.664005] [] ? sysret_check+0x1b/0x56
    [ 1937.664005] [] ? trace_hardirqs_on_caller+0x145/0x1a1
    [ 1937.664005] [] ? trace_hardirqs_on_thunk+0x3a/0x3f
    [ 1937.664005] [] ? spin_lock+0x9/0xb
    [ 1937.664005] [] SyS_connect+0x9/0xb
    [ 1937.664005] [] system_call_fastpath+0x16/0x1b
    [ 1937.664005] Code: 10 2a 84 81 e8 65 76 bd e0 65 ff 0c 25 10 bb 00 00 4d 85 ed 74 37 48 8b 85 60 ff ff ff 48 8b 80 88 01 00 00 48 8b b8 10 02 00 00 8b 47 20 ff 50 20 85 c0 74 0f 83 e8 28 89 83 10 01 00 00 89
    [ 1937.664005] RIP [] pppol2tp_connect+0x33d/0x41e [l2tp_ppp]
    [ 1937.664005] RSP
    [ 1937.664005] CR2: 0000000000000020
    [ 1939.559375] ---[ end trace 82d44500f28f8708 ]---

    Fixes: f34c4a35d879 ("l2tp: take PMTU from tunnel UDP socket")
    Signed-off-by: Guillaume Nault
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Guillaume Nault
     
  • Calling setsockopt with IPV6_JOIN_ANYCAST or IPV6_LEAVE_ANYCAST
    triggers the assertion in addrconf_join_solict()/addrconf_leave_solict()

    ipv6_sock_ac_join(), ipv6_sock_ac_drop(), ipv6_sock_ac_close() need to
    take RTNL before calling ipv6_dev_ac_inc/dec. Same thing with
    ipv6_sock_mc_join(), ipv6_sock_mc_drop(), ipv6_sock_mc_close() before
    calling ipv6_dev_mc_inc/dec.

    This patch moves ASSERT_RTNL() up a level in the call stack.

    Signed-off-by: Cong Wang
    Signed-off-by: Sabrina Dubroca
    Reported-by: Tommi Rantala
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Sabrina Dubroca
     

05 Sep, 2014

1 commit

  • …ernel/git/jberg/mac80211

    Johannes Berg <johannes@sipsolutions.net> says:

    "Here are a few fixes for mac80211. One has been discussed for a while
    and adds a terminating NUL-byte to the alpha2 sent to userspace, which
    shouldn't be necessary but since many places treat it as a string we
    couldn't move to just sending two bytes.

    In addition to that, we have two VLAN fixes from Felix, a mesh fix, a
    fix for the recently introduced RX aggregation offload, a revert for
    a broken patch (that luckily didn't really cause any harm) and a small
    fix for alignment in debugfs."

    Signed-off-by: John W. Linville <linville@redhat.com>

    John W. Linville
     

04 Sep, 2014

1 commit


03 Sep, 2014

3 commits

  • The user_skb maybe be leaked if the operation on it failed and codes
    skipped into the label "out:" without calling genlmsg_unicast.

    Cc: Pravin Shelar
    Signed-off-by: Li RongQing
    Acked-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Li RongQing
     
  • make defconfig reports:

    warning: (NETFILTER_XT_TARGET_LOG) selects NF_LOG_IPV6 which has unmet direct dependencies (NET && INET && IPV6 && NETFILTER && NETFILTER_ADVANCED)

    Fixes: d79a61d netfilter: NETFILTER_XT_TARGET_LOG selects NF_LOG_*
    Reported-by: kbuild test robot
    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: David S. Miller

    Pablo Neira
     
  • Pablo Neira Ayuso says:

    ====================
    pull request: Netfilter/IPVS fixes for net

    The following patchset contains seven Netfilter fixes for your net
    tree, they are:

    1) Make the NAT infrastructure independent of x_tables, some users are
    already starting to test nf_tables with NAT without enabling x_tables.
    Without this patch for Kconfig, there's a superfluous dependency
    between NAT and x_tables.
    2) Allow to use 0 in the cgroup match, the kernel rejects with -EINVAL
    with no good reason. From Daniel Borkmann.

    3) Select CONFIG_NF_NAT from the nf_tables NAT expression, this also
    resolves another NAT dependency with x_tables.

    4) Use HAVE_JUMP_LABEL instead of CONFIG_JUMP_LABEL in the Netfilter hook
    code as elsewhere in the kernel to resolve toolchain problems, from
    Zhouyi Zhou.

    5) Use iptunnel_handle_offloads() to set up tunnel encapsulation
    depending on the offload capabilities, reported by Alex Gartrell
    patch from Julian Anastasov.

    6) Fix wrong family when registering the ip_vs_local_reply6() hook,
    also from Julian.

    7) Select the NF_LOG_* symbols from NETFILTER_XT_TARGET_LOG. Rafał
    Miłecki reported that when jumping from 3.16 to 3.17-rc, his log
    target is not selected anymore due to changes in the previous
    development cycle to accomodate the full logging support for
    nf_tables.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

02 Sep, 2014

1 commit

  • John W. Linville says:

    ====================
    pull request: wireless 2014-08-28

    Please pull this batch of fixes intended for the 3.17 stream.

    For the Bluetooth/6LowPAN/802.15.4 bits, Johan says:

    'It contains a connection reference counting fix for LE where a
    connection might stay up even though it should get disconnected.

    The other 802.15.4 6LoWPAN related patches were sent to the bluetooth
    tree by Alexander Aring and described as follows by him:

    "
    these patches contains patches for the bluetooth branch.

    This series includes memory leak fixes and an errno value fix.
    Also there are two patches for sending and receiving 1280 6LoWPAN
    packets, which makes the IEEE 802.15.4 6LoWPAN stack more RFC
    compliant.
    "'

    Along with that...

    Alexey Khoroshilov fixes a use-after-free bug on at76c50x-usb.

    Hauke Mehrtens adds a PCI ID to bcma.

    Himangi Saraogi fixes a silly "A || A" test in rtlwifi.

    Larry Finger adds a device ID to rtl8192cu.

    Maks Naumov fixes a strncmp argument in ath9k.

    Álvaro Fernández Rojas adds a PCI ID to ssb.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

01 Sep, 2014

1 commit

  • CONFIG_NETFILTER_XT_TARGET_LOG is not selected anymore when jumping
    from 3.16 to 3.17-rc1 if you don't set on the new NF_LOG_IPV4 and
    NF_LOG_IPV6 switches.

    Change this to select the three new symbols NF_LOG_COMMON, NF_LOG_IPV4
    and NF_LOG_IPV6 instead, so NETFILTER_XT_TARGET_LOG remains enabled
    when moving from old to new kernels.

    Reported-by: Rafał Miłecki
    Signed-off-by: Pablo Neira Ayuso

    Pablo Neira Ayuso
     

30 Aug, 2014

2 commits

  • Since SCTP day 1, that is, 19b55a2af145 ("Initial commit") from lksctp
    tree, the official header carries a copy of enum
    sctp_sstat_state that looks like (compared to the current in-kernel
    enumeration):

    User definition: Kernel definition:

    enum sctp_sstat_state { typedef enum {
    SCTP_EMPTY = 0,
    SCTP_CLOSED = 1, SCTP_STATE_CLOSED = 0,
    SCTP_COOKIE_WAIT = 2, SCTP_STATE_COOKIE_WAIT = 1,
    SCTP_COOKIE_ECHOED = 3, SCTP_STATE_COOKIE_ECHOED = 2,
    SCTP_ESTABLISHED = 4, SCTP_STATE_ESTABLISHED = 3,
    SCTP_SHUTDOWN_PENDING = 5, SCTP_STATE_SHUTDOWN_PENDING = 4,
    SCTP_SHUTDOWN_SENT = 6, SCTP_STATE_SHUTDOWN_SENT = 5,
    SCTP_SHUTDOWN_RECEIVED = 7, SCTP_STATE_SHUTDOWN_RECEIVED = 6,
    SCTP_SHUTDOWN_ACK_SENT = 8, SCTP_STATE_SHUTDOWN_ACK_SENT = 7,
    }; } sctp_state_t;

    This header was later on also placed into the uapi, so that user space
    programs can compile without having , but the shipped
    with instead.

    While RFC6458 under 8.2.1.Association Status (SCTP_STATUS) says that
    sstat_state can range from SCTP_CLOSED to SCTP_SHUTDOWN_ACK_SENT, we
    nevertheless have a what it appears to be dummy SCTP_EMPTY state from
    the very early days.

    While it seems to do just nothing, commit 0b8f9e25b0aa ("sctp: remove
    completely unsed EMPTY state") did the right thing and removed this dead
    code. That however, causes an off-by-one when the user asks the SCTP
    stack via SCTP_STATUS API and checks for the current socket state thus
    yielding possibly undefined behaviour in applications as they expect
    the kernel to tell the right thing.

    The enumeration had to be changed however as based on the current socket
    state, we access a function pointer lookup-table through this. Therefore,
    I think the best way to deal with this is just to add a helper function
    sctp_assoc_to_state() to encapsulate the off-by-one quirk.

    Reported-by: Tristan Su
    Fixes: 0b8f9e25b0aa ("sctp: remove completely unsed EMPTY state")
    Signed-off-by: Daniel Borkmann
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • In commit ed98df3361f0 ("net: use __GFP_NORETRY for high order
    allocations") we tried to address one issue caused by order-3
    allocations.

    We still observe high latencies and system overhead in situations where
    compaction is not successful.

    Instead of trying order-3, order-2, and order-1, do a single order-3
    best effort and immediately fallback to plain order-0.

    This mimics slub strategy to fallback to slab min order if the high
    order allocation used for performance failed.

    Order-3 allocations give a performance boost only if they can be done
    without recurring and expensive memory scan.

    Quoting David :

    The page allocator relies on synchronous (sync light) memory compaction
    after direct reclaim for allocations that don't retry and deferred
    compaction doesn't work with this strategy because the allocation order
    is always decreasing from the previous failed attempt.

    This means sync light compaction will always be encountered if memory
    cannot be defragmented or reclaimed several times during the
    skb_page_frag_refill() iteration.

    Signed-off-by: Eric Dumazet
    Acked-by: David Rientjes
    Signed-off-by: David S. Miller

    Eric Dumazet
     

28 Aug, 2014

1 commit

  • commit fc604767613b6d2036cdc35b660bc39451040a47
    ("ipvs: changes for local real server") from 2.6.37
    introduced DNAT support to local real server but the
    IPv6 LOCAL_OUT handler ip_vs_local_reply6() is
    registered incorrectly as IPv4 hook causing any outgoing
    IPv4 traffic to be dropped depending on the IP header values.

    Chris tracked down the problem to CONFIG_IP_VS_IPV6=y
    Bug report: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1349768

    Reported-by: Chris J Arges
    Tested-by: Chris J Arges
    Signed-off-by: Julian Anastasov
    Signed-off-by: Simon Horman

    Julian Anastasov
     

27 Aug, 2014

1 commit

  • The tunneling method should properly use tunnel encapsulation.
    Fixes problem with CHECKSUM_PARTIAL packets when TCP/UDP csum
    offload is supported.

    Thanks to Alex Gartrell for reporting the problem, providing
    solution and for all suggestions.

    Reported-by: Alex Gartrell
    Signed-off-by: Julian Anastasov
    Signed-off-by: Alex Gartrell
    Signed-off-by: Simon Horman

    Julian Anastasov
     

26 Aug, 2014

10 commits


25 Aug, 2014

1 commit


23 Aug, 2014

5 commits