[PATCH 3.18 61/86] Bluetooth: Align minimum encryption key size for LE and BR/EDR connections

2019-05-15 Thread Greg Kroah-Hartman
From: Marcel Holtmann commit d5bb334a8e171b262e48f378bd2096c0ea458265 upstream. The minimum encryption key size for LE connections is 56 bits and to align LE with BR/EDR, enforce 56 bits of minimum encryption key size for BR/EDR connections as well. Signed-off-by: Marcel Holtmann Signed-off-by

[PATCH 4.4 010/266] sunrpc: dont mark uninitialised items as VALID.

2019-05-15 Thread Greg Kroah-Hartman
From: NeilBrown commit d58431eacb226222430940134d97bfd72f292fcd upstream. A recent commit added a call to cache_fresh_locked() when an expired item was found. The call sets the CACHE_VALID flag, so it is important that the item actually is valid. There are two ways it could be valid: 1/ If ->upd

[PATCH 4.4 018/266] powerpc/rfi-flush: Make it possible to call setup_rfi_flush() again

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit abf110f3e1cea40f5ea15e85f5d67c39c14568a7 upstream. For PowerVM migration we want to be able to call setup_rfi_flush() again after we've migrated the partition. To support that we need to check that we're not trying to allocate the fallback flush area after memblock

[PATCH 4.4 002/266] KVM: fail KVM_SET_VCPU_EVENTS with invalid exception number

2019-05-15 Thread Greg Kroah-Hartman
commit 78e546c824fa8f96d323b7edd6f5cad5b74af057 upstream This cannot be returned by KVM_GET_VCPU_EVENTS, so it is okay to return EINVAL. It causes a WARN from exception_type: WARNING: CPU: 3 PID: 16732 at arch/x86/kvm/x86.c:345 exception_type+0x49/0x50 [kvm]() CPU: 3 PID: 16732 Comm: a.

[PATCH 4.4 019/266] powerpc/rfi-flush: Always enable fallback flush on pseries

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 84749a58b6e382f109abf1e734bc4dd43c2c25bb upstream. This ensures the fallback flush area is always allocated on pseries, so in case a LPAR is migrated from a patched to an unpatched system, it is possible to enable the fallback flush in the target system. Signed-off

[PATCH 4.4 013/266] powerpc/xmon: Add RFI flush related fields to paca dump

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 274920a3ecd5f43af0cc380bc0a9ee73a52b9f8a upstream. Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/xmon/xmon.c |4 1 file changed, 4 insertions(+) --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -2144,

[PATCH 4.4 003/266] cifs: do not attempt cifs operation on smb2+ rename error

2019-05-15 Thread Greg Kroah-Hartman
From: Frank Sorenson commit 652727bbe1b17993636346716ae5867627793647 upstream. A path-based rename returning EBUSY will incorrectly try opening the file with a cifs (NT Create AndX) operation on an smb2+ mount, which causes the server to force a session close. If the mount is smb2+, skip the fa

[PATCH 4.4 007/266] ceph: ensure d_name stability in ceph_dentry_hash()

2019-05-15 Thread Greg Kroah-Hartman
From: Jeff Layton commit 76a495d666e5043ffc315695f8241f5e94a98849 upstream. Take the d_lock here to ensure that d_name doesn't change. Cc: sta...@vger.kernel.org Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov Signed-off-by: Greg Kroah-Hartman --- fs/ceph/

[PATCH 4.4 040/266] powerpc/64s: Enable barrier_nospec based on firmware settings

2019-05-15 Thread Greg Kroah-Hartman
From: Michal Suchanek commit cb3d6759a93c6d0aea1c10deb6d00e111c29c19c upstream. Check what firmware told us and enable/disable the barrier_nospec as appropriate. We err on the side of enabling the barrier, as it's no-op on older systems, see the comment for more detail. Signed-off-by: Michael

[PATCH 4.4 004/266] MIPS: scall64-o32: Fix indirect syscall number load

2019-05-15 Thread Greg Kroah-Hartman
From: Aurelien Jarno commit 79b4a9cf0e2ea8203ce777c8d5cfa86c71eae86e upstream. Commit 4c21b8fd8f14 (MIPS: seccomp: Handle indirect system calls (o32)) added indirect syscall detection for O32 processes running on MIPS64, but it did not work correctly for big endian kernel/processes. The reason i

[PATCH 4.4 020/266] powerpc/rfi-flush: Differentiate enabled and patched flush types

2019-05-15 Thread Greg Kroah-Hartman
From: Mauricio Faria de Oliveira commit 0063d61ccfc011f379a31acaeba6de7c926fed2c upstream. Currently the rfi-flush messages print 'Using flush' for all enabled_flush_types, but that is not necessarily true -- as now the fallback flush is always enabled on pseries, but the fixup function overwri

[PATCH 4.4 039/266] powerpc/64s: Patch barrier_nospec in modules

2019-05-15 Thread Greg Kroah-Hartman
From: Michal Suchanek commit 815069ca57c142eb71d27439bc27f41a433a67b3 upstream. Note that unlike RFI which is patched only in kernel the nospec state reflects settings at the time the module was loaded. Iterating all modules and re-patching every time the settings change is not implemented. Ba

[PATCH 4.4 021/266] powerpc/pseries: Add new H_GET_CPU_CHARACTERISTICS flags

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit c4bc36628d7f8b664657d8bd6ad1c44c177880b7 upstream. Add some additional values which have been defined for the H_GET_CPU_CHARACTERISTICS hypercall. Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/include/asm/hvcall.h |3 +++

[PATCH 4.4 038/266] powerpc/64s: Add support for ori barrier_nospec patching

2019-05-15 Thread Greg Kroah-Hartman
From: Michal Suchanek commit 2eea7f067f495e33b8b116b35b5988ab2b8aec55 upstream. Based on the RFI patching. This is required to be able to disable the speculation barrier. Only one barrier type is supported and it does nothing when the firmware does not enable it. Also re-patching modules is not

[PATCH 4.4 033/266] powerpc: Move default security feature flags

2019-05-15 Thread Greg Kroah-Hartman
From: Mauricio Faria de Oliveira commit e7347a86830f38dc3e40c8f7e28c04412b12a2e7 upstream. This moves the definition of the default security feature flags (i.e., enabled by default) closer to the security feature flags. This can be used to restore current flags to the default flags. Signed-off

[PATCH 4.4 008/266] ceph: fix ci->i_head_snapc leak

2019-05-15 Thread Greg Kroah-Hartman
From: Yan, Zheng commit 37659182bff1eeaaeadcfc8f853c6d2b6dbc3f47 upstream. We missed two places that i_wrbuffer_ref_head, i_wr_ref, i_dirty_caps and i_flushing_caps may change. When they are all zeros, we should free i_head_snapc. Cc: sta...@vger.kernel.org Link: https://tracker.ceph.com/issues

[PATCH 4.4 036/266] powerpc/64s: Add support for a store forwarding barrier at kernel entry/exit

2019-05-15 Thread Greg Kroah-Hartman
From: Nicholas Piggin commit a048a07d7f4535baa4cbad6bc024f175317ab938 upstream. On some CPUs we can prevent a vulnerability related to store-to-load forwarding by preventing store forwarding between privilege domains, by inserting a barrier in kernel entry and exit paths. This is known to be th

[PATCH 4.4 000/266] 4.4.180-stable review

2019-05-15 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.180 release. There are 266 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made by Fri 17 May 2019 09:04:49 AM UTC. Anything re

[PATCH 4.4 035/266] powerpc/64s: Fix section mismatch warnings from setup_rfi_flush()

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 501a78cbc17c329fabf8e9750a1e9ab810c88a0e upstream. The recent LPM changes to setup_rfi_flush() are causing some section mismatch warnings because we removed the __init annotation on setup_rfi_flush(): The function setup_rfi_flush() references the function __ini

[PATCH 4.4 009/266] nfsd: Dont release the callback slot unless it was actually held

2019-05-15 Thread Greg Kroah-Hartman
From: Trond Myklebust commit e6abc8caa6deb14be2a206253f7e1c5e37e9515b upstream. If there are multiple callbacks queued, waiting for the callback slot when the callback gets shut down, then they all currently end up acting as if they hold the slot, and call nfsd4_cb_sequence_done() resulting in i

[PATCH 4.4 025/266] powerpc/powernv: Set or clear security feature flags

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 77addf6e95c8689e478d607176b399a6242a777e upstream. Now that we have feature flags for security related things, set or clear them based on what we see in the device tree provided by firmware. Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- a

[PATCH 4.4 044/266] powerpc64s: Show ori31 availability in spectre_v1 sysfs file not v2

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 6d44acae1937b81cf8115ada8958e04f601f3f2e upstream. When I added the spectre_v2 information in sysfs, I included the availability of the ori31 speculation barrier. Although the ori31 barrier can be used to mitigate v2, it's primarily intended as a spectre v1 mitigat

[PATCH 4.4 045/266] powerpc/64: Disable the speculation barrier from the command line

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit cf175dc315f90185128fb061dc05b6fbb211aa2f upstream. The speculation barrier can be disabled from the command line with the parameter: "nospectre_v1". Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/ker

[PATCH 4.4 046/266] powerpc/64: Make stf barrier PPC_BOOK3S_64 specific.

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit 6453b532f2c8856a80381e6b9a1f5ea2f12294df upstream. NXP Book3E platforms are not vulnerable to speculative store bypass, so make the mitigations PPC_BOOK3S_64 specific. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --

[PATCH 4.4 042/266] powerpc: Use barrier_nospec in copy_from_user()

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit ddf35cf3764b5a182b178105f57515b42e2634f8 upstream. Based on the x86 commit doing the same. See commit 304ec1b05031 ("x86/uaccess: Use __uaccess_begin_nospec() and uaccess_try_nospec") and b3bbfb3fb5d2 ("x86: Introduce __uaccess_begin_nospec() and uaccess_try_nospec

[PATCH 4.4 052/266] powerpc/64s: Add new security feature flags for count cache flush

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit dc8c6cce9a26a51fc19961accb978217a3ba8c75 upstream. Add security feature flags to indicate the need for software to flush the count cache on context switch, and for the presence of a hardware assisted count cache flush. Signed-off-by: Michael Ellerman Signed-off-by

[PATCH 4.4 053/266] powerpc/64s: Add support for software count cache flush

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit ee13cb249fabdff8b90aaff61add347749280087 upstream. Some CPU revisions support a mode where the count cache needs to be flushed by software on context switch. Additionally some revisions may have a hardware accelerated flush, in which case the software flush sequence

[PATCH 4.4 026/266] powerpc/64s: Move cpu_show_meltdown()

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 8ad33041563a10b34988800c682ada14b2612533 upstream. This landed in setup_64.c for no good reason other than we had nowhere else to put it. Now that we have a security-related file, that is a better place for it so move it. Signed-off-by: Michael Ellerman Signed-off

[PATCH 4.4 027/266] powerpc/64s: Enhance the information in cpu_show_meltdown()

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit ff348355e9c72493947be337bb4fae4fc1a41eba upstream. Now that we have the security feature flags we can make the information displayed in the "meltdown" file more informative. Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/inclu

[PATCH 4.4 047/266] powerpc/64: Add CONFIG_PPC_BARRIER_NOSPEC

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 179ab1cbf883575c3a585bcfc0f2160f1d22a149 upstream. Add a config symbol to encode which platforms support the barrier_nospec speculation barrier. Currently this is just Book3S 64 but we will add Book3E in a future patch. Signed-off-by: Diana Craciun Signed-off-by:

[PATCH 4.4 058/266] powerpc/fsl: Add macro to flush the branch predictor

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit 1cbf8990d79ff69da8ad09e8a3df014e1494462b upstream. The BUCSR register can be used to invalidate the entries in the branch prediction mechanisms. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/include

[PATCH 4.4 050/266] powerpc/fsl: Add barrier_nospec implementation for NXP PowerPC Book3E

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit ebcd1bfc33c7a90df941df68a6e5d4018c022fba upstream. Implement the barrier_nospec as a isync;sync instruction sequence. The implementation uses the infrastructure built for BOOK3S 64. Signed-off-by: Diana Craciun [mpe: Add PPC_INST_ISYNC for backport] Signed-off-by: Mi

[PATCH 4.4 056/266] powerpc: Avoid code patching freed init sections

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Neuling commit 51c3c62b58b357e8d35e4cc32f7b4ec907426fe3 upstream. This stops us from doing code patching in init sections after they've been freed. In this chain: kvm_guest_init() -> kvm_use_magic_page() -> fault_in_pages_readable() -> __get_user() ->

[PATCH 4.4 066/266] slip: make slhc_free() silently accept an error pointer

2019-05-15 Thread Greg Kroah-Hartman
From: Linus Torvalds commit baf76f0c58aec435a3a864075b8f6d8ee5d1f17e upstream. This way, slhc_free() accepts what slhc_init() returns, whether that is an error or not. In particular, the pattern in sl_alloc_bufs() is slcomp = slhc_init(16, 16); ... slhc_free(slcomp); f

[PATCH 4.4 065/266] tipc: handle the err returned from cmd header function

2019-05-15 Thread Greg Kroah-Hartman
From: Xin Long commit 2ac695d1d602ce00b12170242f58c3d3a8e36d04 upstream. Syzbot found a crash: BUG: KMSAN: uninit-value in tipc_nl_compat_name_table_dump+0x54f/0xcd0 net/tipc/netlink_compat.c:872 Call Trace: tipc_nl_compat_name_table_dump+0x54f/0xcd0 net/tipc/netlink_compat.c:872 _

[PATCH 4.4 064/266] powerpc/fsl: Fix the flush of branch predictor.

2019-05-15 Thread Greg Kroah-Hartman
From: Christophe Leroy commit 27da80719ef132cf8c80eb406d5aeb37dddf78cc upstream. The commit identified below adds MC_BTB_FLUSH macro only when CONFIG_PPC_FSL_BOOK3E is defined. This results in the following error on some configs (seen several times with kisskb randconfig_defconfig) arch/powerpc

[PATCH 4.4 023/266] powerpc: Add security feature flags for Spectre/Meltdown

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 9a868f634349e62922c226834aa23e3d1329ae7f upstream. This commit adds security feature flags to reflect the settings we receive from firmware regarding Spectre/Meltdown mitigations. The feature names reflect the names we are given by firmware on bare metal machines.

[PATCH 4.4 029/266] powerpc/pseries: Use the security flags in pseries_setup_rfi_flush()

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 2e4a16161fcd324b1f9bf6cb6856529f7eaf0689 upstream. Now that we have the security flags we can simplify the code in pseries_setup_rfi_flush() because the security flags have pessimistic defaults. Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --

[PATCH 4.4 084/266] powerpc/fsl: Fixed warning: orphan section `__btb_flush_fixup

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit 039daac5526932ec731e4499613018d263af8b3e upstream. Fixed the following build warning: powerpc-linux-gnu-ld: warning: orphan section `__btb_flush_fixup' from `arch/powerpc/kernel/head_44x.o' being placed in section `__btb_flush_fixup'. Signed-off-by: Diana Craciun Sig

[PATCH 4.4 030/266] powerpc/64s: Wire up cpu_show_spectre_v1()

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 56986016cb8cd9050e601831fe89f332b4e3c46e upstream. Add a definition for cpu_show_spectre_v1() to override the generic version. Currently this just prints "Not affected" or "Vulnerable" based on the firmware flag. Although the kernel does have array_index_nospec() i

[PATCH 4.4 077/266] net: stmmac: move stmmac_check_ether_addr() to driver probe

2019-05-15 Thread Greg Kroah-Hartman
From: Vinod Koul [ Upstream commit b561af36b1841088552464cdc3f6371d92f17710 ] stmmac_check_ether_addr() checks the MAC address and assigns one in driver open(). In many cases when we create slave netdevice, the dev addr is inherited from master but the master dev addr maybe NULL at that time, so

[PATCH 4.4 082/266] powerpc/fsl: Flush the branch predictor at each kernel entry (32 bit)

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit 7fef436295bf6c05effe682c8797dfcb0deb112a upstream. In order to protect against speculation attacks on indirect branches, the branch predictor is flushed at kernel entry to protect for the following situations: - userspace process attacking another userspace process - u

[PATCH 4.4 032/266] powerpc/pseries: Fix clearing of security feature flags

2019-05-15 Thread Greg Kroah-Hartman
From: Mauricio Faria de Oliveira commit 0f9bdfe3c77091e8704d2e510eb7c2c2c6cde524 upstream. The H_CPU_BEHAV_* flags should be checked for in the 'behaviour' field of 'struct h_cpu_char_result' -- 'character' is for H_CPU_CHAR_* flags. Found by playing around with QEMU's implementation of the hyp

[PATCH 4.4 078/266] ipv4: set the tcp_min_rtt_wlen range from 0 to one day

2019-05-15 Thread Greg Kroah-Hartman
From: ZhangXiaoxu [ Upstream commit 19fad20d15a6494f47f85d869f00b11343ee5c78 ] There is a UBSAN report as below: UBSAN: Undefined behaviour in net/ipv4/tcp_input.c:2877:56 signed integer overflow: 2147483647 * 1000 cannot be represented in type 'int' CPU: 3 PID: 0 Comm: swapper/3 Not tainted 5.1

[PATCH 4.4 085/266] powerpc/fsl: Add FSL_PPC_BOOK3E as supported arch for nospectre_v2 boot arg

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit e59f5bd759b7dee57593c5b6c0441609bda5d530 upstream. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- Documentation/kernel-parameters.txt |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/Documentation/

[PATCH 4.4 069/266] NFS: Forbid setting AF_INET6 to "struct sockaddr_in"->sin_family.

2019-05-15 Thread Greg Kroah-Hartman
From: Tetsuo Handa commit 7c2bd9a39845bfb6d72ddb55ce737650271f6f96 upstream. syzbot is reporting uninitialized value at rpc_sockaddr2uaddr() [1]. This is because syzbot is setting AF_INET6 to "struct sockaddr_in"->sin_family (which is embedded into user-visible "struct nfs_mount_data" structure)

[PATCH 4.4 089/266] qlcnic: Avoid potential NULL pointer dereference

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 5bf7295fe34a5251b1d241b9736af4697b590670 ] netdev_alloc_skb can fail and return a NULL pointer which is dereferenced without a check. The patch avoids such a scenario. Signed-off-by: Aditya Pakki Signed-off-by: David S. Miller Signed-off-by: Sasha Levin (Microsoft) --- drive

[PATCH 4.4 092/266] usb: gadget: net2280: Fix overrun of OUT messages

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 9d6a54c1430647355a5e23434881b2ca3d192b48 ] The OUT endpoint normally blocks (NAK) subsequent packets when a short packet was received and returns an incomplete queue entry to the gadget driver. Thereby the gadget driver can detect a short packet when reading queue entries with a

[PATCH 4.4 096/266] net: ks8851: Dequeue RX packets explicitly

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 536d3680fd2dab5c39857d62a3e084198fc74ff9 ] The ks8851 driver lets the chip auto-dequeue received packets once they have been read in full. It achieves that by setting the ADRFE flag in the RXQCR register ("Auto-Dequeue RXQ Frame Enable"). However if allocation of a packet's sock

[PATCH 4.4 090/266] netfilter: bridge: set skb transport_header before entering NF_INET_PRE_ROUTING

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit e166e4fdaced850bee3d5ee12a5740258fb30587 ] Since Commit 21d1196a35f5 ("ipv4: set transport header earlier"), skb->transport_header has been always set before entering INET netfilter. This patch is to set skb->transport_header for bridge before entering INET netfilter by bridge-nf

[PATCH 4.4 093/266] usb: gadget: net2280: Fix net2280_dequeue()

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit f1d3fba17cd4eeea20397f1324b7b9c69a6a935c ] When a request must be dequeued with net2280_dequeue() e.g. due to a device clear action and the same request is finished by the function scan_dma_completions() then the function net2280_dequeue() does not find the request in the followi

[PATCH 4.4 095/266] ARM: dts: pfla02: increase phy reset duration

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 032f85c9360fb1a08385c584c2c4ed114b33c260 ] Increase the reset duration to ensure correct phy functionality. The reset duration is taken from barebox commit 52fdd510de ("ARM: dts: pfla02: use long enough reset for ethernet phy"): Use a longer reset time for ethernet phy Micrel

[PATCH 4.4 100/266] net: xilinx: fix possible object reference leak

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit fa3a419d2f674b431d38748cb58fb7da17ee8949 ] The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/net/ethernet/xilinx/xilinx_axienet_

[PATCH 4.4 098/266] net: ks8851: Delay requesting IRQ until opened

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit d268f31552794abf5b6aa5af31021643411f25f5 ] The ks8851 driver currently requests the IRQ before registering the net_device. Because the net_device name is used as IRQ name and is still "eth%d" when the IRQ is requested, it's impossibe to tell IRQs apart if multiple ks8851 chips a

[PATCH 4.4 070/266] netfilter: ebtables: CONFIG_COMPAT: drop a bogus WARN_ON

2019-05-15 Thread Greg Kroah-Hartman
From: Florian Westphal commit 7caa56f006e9d712b44f27b32520c66420d5cbc6 upstream. It means userspace gave us a ruleset where there is some other data after the ebtables target but before the beginning of the next rule. Fixes: 81e675c227ec ("netfilter: ebtables: add CONFIG_COMPAT support") Report

[PATCH 4.4 072/266] tipc: check link name with right length in tipc_nl_compat_link_set

2019-05-15 Thread Greg Kroah-Hartman
From: Xin Long commit 8c63bf9ab4be8b83bd8c34aacfd2f1d2c8901c8a upstream. A similar issue as fixed by Patch "tipc: check bearer name with right length in tipc_nl_compat_bearer_enable" was also found by syzbot in tipc_nl_compat_link_set(). The length to check with should be 'TLV_GET_DATA_LEN(msg-

[PATCH 4.4 073/266] bpf: reject wrong sized filters earlier

2019-05-15 Thread Greg Kroah-Hartman
From: Daniel Borkmann commit f7bd9e36ee4a4ce38e1cddd7effe6c0d9943285b upstream. Add a bpf_check_basics_ok() and reject filters that are of invalid size much earlier, so we don't do any useless work such as invoking bpf_prog_alloc(). Currently, rejection happens in bpf_check_classic() only, but i

[PATCH 4.4 071/266] tipc: check bearer name with right length in tipc_nl_compat_bearer_enable

2019-05-15 Thread Greg Kroah-Hartman
From: Xin Long commit 6f07e5f06c8712acc423485f657799fc8e11e56c upstream. Syzbot reported the following crash: BUG: KMSAN: uninit-value in memchr+0xce/0x110 lib/string.c:961 memchr+0xce/0x110 lib/string.c:961 string_is_valid net/tipc/netlink_compat.c:176 [inline] tipc_nl_compat_bearer_enab

[PATCH 4.4 067/266] intel_th: gth: Fix an off-by-one in output unassigning

2019-05-15 Thread Greg Kroah-Hartman
From: Alexander Shishkin commit 91d3f8a629849968dc91d6ce54f2d46abf4feb7f upstream. Commit 9ed3f3c3 ("intel_th: Don't reference unassigned outputs") fixes a NULL dereference for all masters except the last one ("256+"), which keeps the stale pointer after the output driver had been unassigned

[PATCH 4.4 074/266] Revert "block/loop: Use global lock for ioctl() operation."

2019-05-15 Thread Greg Kroah-Hartman
From: Greg Kroah-Hartman This reverts commit b3f3107fbd928fed6e4fecbe3da2ed5f43216439 which is commit 310ca162d779efee8a2dc3731439680f3e9c1e86 upstream. Jan Kara has reported seeing problems with this patch applied, as has Salvatore Bonaccorso, so let's drop it for now. Reported-by: Salvatore B

[PATCH 4.4 124/266] jffs2: fix use-after-free on symlink traversal

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 4fdcfab5b5537c21891e22e65996d4d0dd8ab4ca ] free the symlink body after the same RCU delay we have for freeing the struct inode itself, so that traversal during RCU pathwalk wouldn't step into freed memory. Signed-off-by: Al Viro Signed-off-by: Sasha Levin --- fs/jffs2/readino

[PATCH 4.4 075/266] ipv4: add sanity checks in ipv4_link_failure()

2019-05-15 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 20ff83f10f113c88d0bb74589389b05250994c16 ] Before calling __ip_options_compile(), we need to ensure the network header is a an IPv4 one, and that it is already pulled in skb->head. RAW sockets going through a tunnel can end up calling ipv4_link_failure() wit

[PATCH 4.4 103/266] scsi: qla4xxx: fix a potential NULL pointer dereference

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit fba1bdd2a9a93f3e2181ec1936a3c2f6b37e7ed6 ] In case iscsi_lookup_endpoint fails, the fix returns -EINVAL to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Acked-by: Manish Rangankar Reviewed-by: Mukesh Ojha Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Lev

[PATCH 4.4 123/266] bonding: show full hw address in sysfs for slave entries

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 18bebc6dd3281955240062655a4df35eef2c46b3 ] Bond expects ethernet hwaddr for its slave, but it can be longer than 6 bytes - infiniband interface for example. # cat /sys/devices//net/ib0/address 80:00:02:08:fe:80:00:00:00:00:00:00:7c:fe:90:03:00:be:5d:e1 # cat /sys/devices//ne

[PATCH 4.4 114/266] bnxt_en: Improve multicast address setup logic.

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Chan [ Upstream commit b4e30e8e7ea1d1e35ffd64ca46f7d9a7f227b4bf ] The driver builds a list of multicast addresses and sends it to the firmware when the driver's ndo_set_rx_mode() is called. In rare cases, the firmware can fail this call if internal resources to add multicast addre

[PATCH 4.4 104/266] usb: u132-hcd: fix resource leak

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit f276e002793cdb820862e8ea8f76769d56bba575 ] if platform_driver_register fails, cleanup the allocated resource gracefully. Signed-off-by: Mukesh Ojha Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin (Microsoft) --- drivers/usb/host/u132-hcd.c | 3 +++ 1 file change

[PATCH 4.4 107/266] libata: fix using DMA buffers on stack

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit dd08a8d9a66de4b54575c294a92630299f7e0fe7 ] When CONFIG_VMAP_STACK=y, __pa() returns incorrect physical address for a stack virtual address. Stack DMA buffers must be avoided. Signed-off-by: raymond pang Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin (Microsoft) --- dri

[PATCH 4.4 128/266] scsi: storvsc: Fix calculation of sub-channel count

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 382e06d11e075a40b4094b6ef809f8d4bcc7ab2a ] When the number of sub-channels offered by Hyper-V is >= the number of CPUs in the VM, calculate the correct number of sub-channels. The current code produces one too many. This scenario arises only when the number of CPUs is artificia

[PATCH 4.4 115/266] packet: validate msg_namelen in send directly

2019-05-15 Thread Greg Kroah-Hartman
From: Willem de Bruijn [ Upstream commit 486efdc8f6ce802b27e15921d2353cc740c55451 ] Packet sockets in datagram mode take a destination address. Verify its length before passing to dev_hard_header. Prior to 2.6.14-rc3, the send code ignored sll_halen. This is established behavior. Directly compa

[PATCH 4.4 129/266] net: hns: Use NAPI_POLL_WEIGHT for hns driver

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit acb1ce15a61154aa501891d67ebf79bc9ea26818 ] When the HNS driver loaded, always have an error print: "netif_napi_add() called with weight 256" This is because the kernel checks the NAPI polling weights requested by drivers and it prints an error message if a driver requests a weig

[PATCH 4.4 133/266] ARM: orion: dont use using 64-bit DMA masks

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit cd92d74d67c811dc22544430b9ac3029f5bd64c5 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/plat-orion/common.c:625:29: error: shift count >= width of type [-Werror,-Wshift-count-overflow] .coherent_dma_mask

[PATCH 4.4 132/266] xsysace: Fix error handling in ace_setup

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 47b16820c490149c2923e8474048f2c6e7557cab ] If xace hardware reports a bad version number, the error handling code in ace_setup() calls put_disk(), followed by queue cleanup. However, since the disk data structure has the queue pointer set, put_disk() also cleans and releases the

[PATCH 4.4 126/266] rtc: da9063: set uie_unsupported when relevant

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 882c5e552ffd06856de42261460f46e18319d259 ] The DA9063AD doesn't support alarms on any seconds and its granularity is the minute. Set uie_unsupported in that case. Reported-by: Wolfram Sang Reported-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Acke

[PATCH 4.4 136/266] staging: iio: adt7316: allow adt751x to use internal vref for all dacs

2019-05-15 Thread Greg Kroah-Hartman
From: Jeremy Fertic commit 10bfe7cc1739c22f0aa296b39e53f61e9e3f4d99 upstream. With adt7516/7/9, internal vref is available for dacs a and b, dacs c and d, or all dacs. The driver doesn't currently support internal vref for all dacs. Change the else if to an if so both bits are checked rather tha

[PATCH 4.4 139/266] Input: snvs_pwrkey - initialize necessary driver data before enabling IRQ

2019-05-15 Thread Greg Kroah-Hartman
From: Anson Huang commit bf2a7ca39fd3ab47ef71c621a7ee69d1813b1f97 upstream. SNVS IRQ is requested before necessary driver data initialized, if there is a pending IRQ during driver probe phase, kernel NULL pointer panic will occur in IRQ handler. To avoid such scenario, just initialize necessary

[PATCH 4.4 135/266] usb: usbip: fix isoc packet num validation in get_pipe

2019-05-15 Thread Greg Kroah-Hartman
commit c409ca3be3c6ff3a1eeb303b191184e80d412862 upstream. Backport of the upstream commit, which fixed c6688ef9f297. c6688ef9f297 got backported as commit b6f826ba10dc, as the unavailable function usb_endpoint_maxp_mult had to be replaced. The upstream commit removed the call to this function, so

[PATCH 4.4 147/266] perf/x86/intel: Fix handling of wakeup_events for multi-entry PEBS

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 583feb08e7f7ac9d533b446882eb3a54737a6dbb ] When an event is programmed with attr.wakeup_events=N (N>0), it means the caller is interested in getting a user level notification after N samples have been recorded in the kernel sampling buffer. With precise events on Intel processor

[PATCH 4.4 159/266] netfilter: compat: initialize all fields in xt_init

2019-05-15 Thread Greg Kroah-Hartman
commit 8d29d16d21342a0c86405d46de0c4ac5daf1760f upstream If a non zero value happens to be in xt[NFPROTO_BRIDGE].cur at init time, the following panic can be caused by running % ebtables -t broute -F BROUTING from a 32-bit user level on a 64-bit kernel. This patch replaces kmalloc_array with kca

[PATCH 4.4 143/266] scsi: libsas: fix a race condition when smp task timeout

2019-05-15 Thread Greg Kroah-Hartman
From: Jason Yan commit b90cd6f2b905905fb42671009dc0e27c310a16ae upstream. When the lldd is processing the complete sas task in interrupt and set the task stat as SAS_TASK_STATE_DONE, the smp timeout timer is able to be triggered at the same time. And smp_task_timedout() will complete the task wh

[PATCH 4.4 119/266] USB: core: Fix bug caused by duplicate interface PM usage counter

2019-05-15 Thread Greg Kroah-Hartman
From: Alan Stern commit c2b71462d294cf517a0bc6e4fd6424d7cee5596f upstream. The syzkaller fuzzer reported a bug in the USB hub driver which turned out to be caused by a negative runtime-PM usage counter. This allowed a hub to be runtime suspended at a time when the driver did not expect it. The

[PATCH 4.4 118/266] USB: core: Fix unterminated string returned by usb_string()

2019-05-15 Thread Greg Kroah-Hartman
From: Alan Stern commit c01c348ecdc66085e44912c97368809612231520 upstream. Some drivers (such as the vub300 MMC driver) expect usb_string() to return a properly NUL-terminated string, even when an error occurs. (In fact, vub300's probe routine doesn't bother to check the return code from usb_str

[PATCH 4.4 149/266] iommu/amd: Set exclusion range correctly

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 3c677d206210f53a4be972211066c0f1cd47fe12 ] The exlcusion range limit register needs to contain the base-address of the last page that is part of the range, as bits 0-11 of this register are treated as 0xfff by the hardware for comparisons. So correctly set the exclusion range in

[PATCH 4.4 151/266] usb: dwc3: Fix default lpm_nyet_threshold value

2019-05-15 Thread Greg Kroah-Hartman
From: Thinh Nguyen commit 8d791929b2fbdf7734c1596d808e55cb457f4562 upstream. The max possible value for DCTL.LPM_NYET_THRES is 15 and not 255. Change the default value to 15. Cc: sta...@vger.kernel.org Fixes: 80caf7d21adc ("usb: dwc3: add lpm erratum support") Signed-off-by: Thinh Nguyen Signe

[PATCH 4.4 150/266] genirq: Prevent use-after-free and work list corruption

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 59c39840f5abf4a71e1810a8da71aaccd6c17d26 ] When irq_set_affinity_notifier() replaces the notifier, then the reference count on the old notifier is dropped which causes it to be freed. But nothing ensures that the old notifier is not longer queued in the work list. If it is queued

[PATCH 4.4 140/266] selinux: never allow relabeling on context mounts

2019-05-15 Thread Greg Kroah-Hartman
From: Ondrej Mosnacek commit a83d6ddaebe541570291205cb538e35ad4ff94f9 upstream. In the SECURITY_FS_USE_MNTPOINT case we never want to allow relabeling files/directories, so we should never set the SBLABEL_MNT flag. The 'special handling' in selinux_is_sblabel_mnt() is only intended for when the

[PATCH 4.4 121/266] rtc: sh: Fix invalid alarm warning for non-enabled alarm

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 15d82d22498784966df8e4696174a16b02cc1052 ] When no alarm has been programmed on RSK-RZA1, an error message is printed during boot: rtc rtc0: invalid alarm value: 2019-03-14T255:255:255 sh_rtc_read_alarm_value() returns 0xff when querying a hardware alarm field that is not e

[PATCH 4.4 144/266] ASoC:soc-pcm:fix a codec fixup issue in TDM case

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 570f18b6a8d1f0e60e8caf30e66161b6438dcc91 ] On HDaudio platforms, if playback is started when capture is working, there is no audible output. This can be root-caused to the use of the rx|tx_mask to store an HDaudio stream tag. If capture is stared before playback, rx_mask would

[PATCH 4.4 116/266] USB: yurex: Fix protection fault after device removal

2019-05-15 Thread Greg Kroah-Hartman
From: Alan Stern commit ef61eb43ada6c1d6b94668f0f514e4c268093ff3 upstream. The syzkaller USB fuzzer found a general-protection-fault bug in the yurex driver. The fault occurs when a device has been unplugged; the driver's interrupt-URB handler logs an error message referring to the device by na

[PATCH 4.4 171/266] ipvs: do not schedule icmp errors from tunnels

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 0261ea1bd1eb0da5c0792a9119b8655cf33c80a3 ] We can receive ICMP errors from client or from tunneling real server. While the former can be scheduled to real server, the latter should not be scheduled, they are decapsulated only when existing connection is found. Fixes: 6044eeffafb

[PATCH 4.4 156/266] ipv6: fix a potential deadlock in do_ipv6_setsockopt()

2019-05-15 Thread Greg Kroah-Hartman
From: WANG Cong commit 8651be8f14a12d24f203f283601d9b0418c389ff upstream. Baozeng reported this deadlock case: CPU0CPU1 lock([ 165.136033] sk_lock-AF_INET6); lock([ 165.136033] rtnl_mutex);

[PATCH 4.4 172/266] s390: ctcm: fix ctcm_new_device error return code

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 27b141fc234a3670d21bd742c35d7205d03cbb3a ] clang points out that the return code from this function is undefined for one of the error paths: ../drivers/s390/net/ctcm_main.c:1595:7: warning: variable 'result' is used uninitialized whenever 'if' condition is true [-Wsometim

[PATCH 4.4 155/266] UAS: fix alignment of scatter/gather segments

2019-05-15 Thread Greg Kroah-Hartman
From: Oliver Neukum commit 3ae62a42090f1ed48e2313ed256a1182a85fb575 upstream. This is the UAS version of 747668dbc061b3e62bc1982767a3a1f9815fcf0e usb-storage: Set virt_boundary_mask to avoid SG overflows We are not as likely to be vulnerable as storage, as it is unlikelier that UAS is run over

[PATCH 4.4 113/266] ipv6: invert flowlabel sharing check in process and user mode

2019-05-15 Thread Greg Kroah-Hartman
From: Willem de Bruijn [ Upstream commit 95c169251bf734aa555a1e8043e4d88ec97a04ec ] A request for a flowlabel fails in process or user exclusive mode must fail if the caller pid or uid does not match. Invert the test. Previously, the test was unsafe wrt PID recycling, but indeed tested for ineq

[PATCH 4.4 162/266] iio: adc: xilinx: fix potential use-after-free on remove

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 62039b6aef63380ba7a37c113bbaeee8a55c5342 ] When cancel_delayed_work() returns, the delayed work may still be running. This means that the core could potentially free the private structure (struct xadc) while the delayed work is still using it. This is a potential use-after-free.

[PATCH 4.4 177/266] Dont jump to compute_result state from check_result state

2019-05-15 Thread Greg Kroah-Hartman
From: Nigel Croxon commit 4f4fd7c5798bbdd5a03a60f6269cf1177fbd11ef upstream. Changing state from check_state_check_result to check_state_compute_result not only is unsafe but also doesn't appear to serve a valid purpose. A raid6 check should only be pushing out extra writes if doing repair and

[PATCH 4.4 176/266] x86/vdso: Pass --eh-frame-hdr to the linker

2019-05-15 Thread Greg Kroah-Hartman
From: Alistair Strachan commit cd01544a268ad8ee5b1dfe42c4393f1095f86879 upstream. Commit 379d98ddf413 ("x86: vdso: Use $LD instead of $CC to link") accidentally broke unwinding from userspace, because ld would strip the .eh_frame sections when linking. Originally, the compiler would implici

[PATCH 4.4 198/266] x86/speculation: Apply IBPB more strictly to avoid cross-process data leak

2019-05-15 Thread Greg Kroah-Hartman
From: Jiri Kosina commit dbfe2953f63c640463c630746cd5d9de8b2f63ae upstream. Currently, IBPB is only issued in cases when switching into a non-dumpable process, the rationale being to protect such 'important and security sensitive' processess (such as GPG) from data leaking into a different users

[PATCH 4.4 164/266] HID: input: add mapping for keyboard Brightness Up/Down/Toggle keys

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 7975a1d6a7afeb3eb61c971a153d24dd8fa032f3 ] According to HUTRR73 usages 0x79, 0x7a and 0x7c from the consumer page correspond to Brightness Up/Down/Toggle keys, so let's add the mappings. Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- drivers/hid/hid-input.c | 4

[PATCHv2] arm64: dts: ls1028a: add flexspi nodes

2019-05-15 Thread Xiaowei Bao
From: Xiaowei Bao Add fspi node property for LS1028A SoC for FlexSPI driver. Property added for the FlexSPI controller and for the connected slave device for the LS1028ARDB and LS1028AQDS target. This is having one SPI-NOR flash device, mt35xu02g connected at CS0. Signed-off-by: Xiaowei Bao ---

[PATCH 4.4 200/266] x86/speculation: Propagate information about RSB filling mitigation to sysfs

2019-05-15 Thread Greg Kroah-Hartman
From: Jiri Kosina commit bb4b3b7762735cdaba5a40fd94c9303d9ffa147a upstream. If spectrev2 mitigation has been enabled, RSB is filled on context switch in order to protect from various classes of spectrev2 attacks. If this mitigation is enabled, say so in sysfs for spectrev2. Signed-off-by: Jiri

<    1   2   3   4   5   6   7   8   9   10   >