~kmously/ubuntu/+source/linux/+git/xenial:update-to-4.4.212

Last commit made on 2020-03-13
Get this branch:
git clone -b update-to-4.4.212 https://git.launchpad.net/~kmously/ubuntu/+source/linux/+git/xenial
Only Khaled El Mously can upload to this branch. If you are Khaled El Mously please log in for upload directions.

Branch merges

Branch information

Name:
update-to-4.4.212
Repository:
lp:~kmously/ubuntu/+source/linux/+git/xenial

Recent commits

040806c... by Greg Kroah-Hartman <email address hidden>

Linux 4.4.212

BugLink: https://bugs.launchpad.net/bugs/1864773

Signed-off-by: Khalid Elmously <email address hidden>

3bce82f... by Wen Huang <email address hidden>

libertas: Fix two buffer overflows at parsing bss descriptor

commit e5e884b42639c74b5b57dc277909915c0aefc8bb upstream.

add_ie_rates() copys rates without checking the length
in bss descriptor from remote AP.when victim connects to
remote attacker, this may trigger buffer overflow.
lbs_ibss_join_existing() copys rates without checking the length
in bss descriptor from remote IBSS node.when victim connects to
remote attacker, this may trigger buffer overflow.
Fix them by putting the length check before performing copy.

This fix addresses CVE-2019-14896 and CVE-2019-14897.
This also fix build warning of mixed declarations and code.

Reported-by: kbuild test robot <email address hidden>
Signed-off-by: Wen Huang <email address hidden>
Signed-off-by: Kalle Valo <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

Signed-off-by: Khalid Elmously <email address hidden>

ba025dc... by Khaled El Mously

Revert "UBUNTU: SAUCE: libertas: Fix two buffer overflows at parsing bss descriptor"

This reverts commit f41dbb3e76d05fff0facb5fe0eb7b3ca5472e720.
Note: it will be replaced by a modified version from linux-stable

Signed-off-by: Khalid Elmously <email address hidden>

25d8f40... by Martin Schiller <email address hidden>

net/x25: fix nonblocking connect

BugLink: https://bugs.launchpad.net/bugs/1864773

commit e21dba7a4df4d93da237da65a096084b4f2e87b4 upstream.

This patch fixes 2 issues in x25_connect():

1. It makes absolutely no sense to reset the neighbour and the
connection state after a (successful) nonblocking call of x25_connect.
This prevents any connection from being established, since the response
(call accept) cannot be processed.

2. Any further calls to x25_connect() while a call is pending should
simply return, instead of creating new Call Request (on different
logical channels).

This patch should also fix the "KASAN: null-ptr-deref Write in
x25_connect" and "BUG: unable to handle kernel NULL pointer dereference
in x25_connect" bugs reported by syzbot.

Signed-off-by: Martin Schiller <email address hidden>
Reported-by: <email address hidden>
Reported-by: <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

005cab1... by =?utf-8?q?Kadlecsik_J=C3=B3zsef?= <email address hidden>

netfilter: ipset: use bitmap infrastructure completely

BugLink: https://bugs.launchpad.net/bugs/1864773

commit 32c72165dbd0e246e69d16a3ad348a4851afd415 upstream.

The bitmap allocation did not use full unsigned long sizes
when calculating the required size and that was triggered by KASAN
as slab-out-of-bounds read in several places. The patch fixes all
of them.

Reported-by: <email address hidden>
Reported-by: <email address hidden>
Reported-by: <email address hidden>
Reported-by: <email address hidden>
Reported-by: <email address hidden>
Reported-by: <email address hidden>
Reported-by: <email address hidden>
Signed-off-by: Jozsef Kadlecsik <email address hidden>
Signed-off-by: Pablo Neira Ayuso <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

377d306... by Andy Shevchenko <email address hidden>

bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free()

BugLink: https://bugs.launchpad.net/bugs/1864773

commit c42b65e363ce97a828f81b59033c3558f8fa7f70 upstream.

A lot of code become ugly because of open coding allocations for bitmaps.

Introduce three helpers to allow users be more clear of intention
and keep their code neat.

Note, due to multiple circular dependencies we may not provide
the helpers as inliners. For now we keep them exported and, perhaps,
at some point in the future we will sort out header inclusion and
inheritance.

Signed-off-by: Andy Shevchenko <email address hidden>
Signed-off-by: Dmitry Torokhov <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

e4c99a6... by Andy Shevchenko <email address hidden>

md: Avoid namespace collision with bitmap API

BugLink: https://bugs.launchpad.net/bugs/1864773

commit e64e4018d572710c44f42c923d4ac059f0a23320 upstream.

bitmap API (include/linux/bitmap.h) has 'bitmap' prefix for its methods.

On the other hand MD bitmap API is special case.
Adding 'md' prefix to it to avoid name space collision.

No functional changes intended.

Signed-off-by: Andy Shevchenko <email address hidden>
Acked-by: Shaohua Li <email address hidden>
Signed-off-by: Dmitry Torokhov <email address hidden>
[only take the bitmap_free change for stable - gregkh]
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

ce5f926... by Bo Wu <email address hidden>

scsi: iscsi: Avoid potential deadlock in iscsi_if_rx func

BugLink: https://bugs.launchpad.net/bugs/1864773

commit bba340c79bfe3644829db5c852fdfa9e33837d6d upstream.

In iscsi_if_rx func, after receiving one request through
iscsi_if_recv_msg func, iscsi_if_send_reply will be called to try to
reply to the request in a do-while loop. If the iscsi_if_send_reply
function keeps returning -EAGAIN, a deadlock will occur.

For example, a client only send msg without calling recvmsg func, then
it will result in the watchdog soft lockup. The details are given as
follows:

 sock_fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ISCSI);
 retval = bind(sock_fd, (struct sock addr*) & src_addr, sizeof(src_addr);
 while (1) {
  state_msg = sendmsg(sock_fd, &msg, 0);
  //Note: recvmsg(sock_fd, &msg, 0) is not processed here.
 }
 close(sock_fd);

watchdog: BUG: soft lockup - CPU#7 stuck for 22s! [netlink_test:253305] Sample time: 4000897528 ns(HZ: 250) Sample stat:
curr: user: 675503481560, nice: 321724050, sys: 448689506750, idle: 4654054240530, iowait: 40885550700, irq: 14161174020, softirq: 8104324140, st: 0
deta: user: 0, nice: 0, sys: 3998210100, idle: 0, iowait: 0, irq: 1547170, softirq: 242870, st: 0 Sample softirq:
         TIMER: 992
         SCHED: 8
Sample irqstat:
         irq 2: delta 1003, curr: 3103802, arch_timer
CPU: 7 PID: 253305 Comm: netlink_test Kdump: loaded Tainted: G OE
Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015
pstate: 40400005 (nZcv daif +PAN -UAO)
pc : __alloc_skb+0x104/0x1b0
lr : __alloc_skb+0x9c/0x1b0
sp : ffff000033603a30
x29: ffff000033603a30 x28: 00000000000002dd
x27: ffff800b34ced810 x26: ffff800ba7569f00
x25: 00000000ffffffff x24: 0000000000000000
x23: ffff800f7c43f600 x22: 0000000000480020
x21: ffff0000091d9000 x20: ffff800b34eff200
x19: ffff800ba7569f00 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000
x15: 0000000000000000 x14: 0001000101000100
x13: 0000000101010000 x12: 0101000001010100
x11: 0001010101010001 x10: 00000000000002dd
x9 : ffff000033603d58 x8 : ffff800b34eff400
x7 : ffff800ba7569200 x6 : ffff800b34eff400
x5 : 0000000000000000 x4 : 00000000ffffffff
x3 : 0000000000000000 x2 : 0000000000000001
x1 : ffff800b34eff2c0 x0 : 0000000000000300 Call trace:
__alloc_skb+0x104/0x1b0
iscsi_if_rx+0x144/0x12bc [scsi_transport_iscsi]
netlink_unicast+0x1e0/0x258
netlink_sendmsg+0x310/0x378
sock_sendmsg+0x4c/0x70
sock_write_iter+0x90/0xf0
__vfs_write+0x11c/0x190
vfs_write+0xac/0x1c0
ksys_write+0x6c/0xd8
__arm64_sys_write+0x24/0x30
el0_svc_common+0x78/0x130
el0_svc_handler+0x38/0x78
el0_svc+0x8/0xc

Link: https://<email address hidden>
Signed-off-by: Bo Wu <email address hidden>
Reviewed-by: Zhiqiang Liu <email address hidden>
Reviewed-by: Lee Duncan <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

3c82cc7... by =?utf-8?q?Lars_M=C3=B6llendorf?= <email address hidden>

iio: buffer: align the size of scan bytes to size of the largest element

BugLink: https://bugs.launchpad.net/bugs/1864773

commit 883f616530692d81cb70f8a32d85c0d2afc05f69 upstream.

Previous versions of `iio_compute_scan_bytes` only aligned each element
to its own length (i.e. its own natural alignment). Because multiple
consecutive sets of scan elements are buffered this does not work in
case the computed scan bytes do not align with the natural alignment of
the first scan element in the set.

This commit fixes this by aligning the scan bytes to the natural
alignment of the largest scan element in the set.

Fixes: 959d2952d124 ("staging:iio: make iio_sw_buffer_preenable much more general.")
Signed-off-by: Lars Möllendorf <email address hidden>
Reviewed-by: Lars-Peter Clausen <email address hidden>
Cc: <email address hidden>
Signed-off-by: Jonathan Cameron <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

b0e41d7... by Al Viro <email address hidden>

do_last(): fetch directory ->i_mode and ->i_uid before it's too late

BugLink: https://bugs.launchpad.net/bugs/1864773

commit d0cb50185ae942b03c4327be322055d622dc79f6 upstream.

may_create_in_sticky() call is done when we already have dropped the
reference to dir.

Fixes: 30aba6656f61e (namei: allow restricted O_CREAT of FIFOs and regular files)
Signed-off-by: Al Viro <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>