~canonical-kernel/ubuntu/+source/linux-euclid:master

Last commit made on 2018-10-30
Get this branch:
git clone -b master https://git.launchpad.net/~canonical-kernel/ubuntu/+source/linux-euclid
Members of Canonical Kernel can upload to this branch. Log in for directions.

Branch merges

Branch information

Recent commits

1e8e0f2... by Stefan Bader

UBUNTU: Ubuntu-euclid-4.4.0-9029.31

Signed-off-by: Stefan Bader <email address hidden>

e913f1b... by Stefan Bader

UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1799407
Signed-off-by: Stefan Bader <email address hidden>

cbcbd12... by Kleber Sacilotto de Souza

UBUNTU: [Packaging] git-ubuntu-log -- fix order of tracking bug commit

The package tracking bug number is not inserted anymore on the changelog
by the link-to-tracker script. Instead, it creates/updates the
debian.<branch>/tracking-bug file and commits the change.

We want this commit to be added to the changelog in a similar fashion as
before, as the first entry. So change the git-ubuntu-log script to
detect that commit and insert it in the right place.

Ignore: yes

Signed-off-by: Kleber Sacilotto de Souza <email address hidden>
Acked-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Signed-off-by: Kleber Sacilotto de Souza <email address hidden>

(cherry picked from commit 7f9d019c89d0ea59a55cda167bd247fe5c0c3daf xenial)
Signed-off-by: Stefan Bader <email address hidden>

ffc7ace... by Eric Dumazet <email address hidden>

tcp: detect malicious patterns in tcp_collapse_ofo_queue()

In case an attacker feeds tiny packets completely out of order,
tcp_collapse_ofo_queue() might scan the whole rb-tree, performing
expensive copies, but not changing socket memory usage at all.

1) Do not attempt to collapse tiny skbs.
2) Add logic to exit early when too many tiny skbs are detected.

We prefer not doing aggressive collapsing (which copies packets)
for pathological flows, and revert to tcp_prune_ofo_queue() which
will be less expensive.

In the future, we might add the possibility of terminating flows
that are proven to be malicious.

Signed-off-by: Eric Dumazet <email address hidden>
Acked-by: Soheil Hassas Yeganeh <email address hidden>
Signed-off-by: David S. Miller <email address hidden>

CVE-2018-5390

(backported from commit 3d4bf93ac12003f9b8e1e2de37fe27983deebdcf)
Signed-off-by: Tyler Hicks <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>

(cherry picked from commit d42da7c941b77be76986c995fb410e9c8abff4d4 xenial)
Signed-off-by: Stefan Bader <email address hidden>

3c5a59a... by Eric Dumazet <email address hidden>

tcp: avoid collapses in tcp_prune_queue() if possible

Right after a TCP flow is created, receiving tiny out of order
packets allways hit the condition :

if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf)
 tcp_clamp_window(sk);

tcp_clamp_window() increases sk_rcvbuf to match sk_rmem_alloc
(guarded by tcp_rmem[2])

Calling tcp_collapse_ofo_queue() in this case is not useful,
and offers a O(N^2) surface attack to malicious peers.

Better not attempt anything before full queue capacity is reached,
forcing attacker to spend lots of resource and allow us to more
easily detect the abuse.

Signed-off-by: Eric Dumazet <email address hidden>
Acked-by: Soheil Hassas Yeganeh <email address hidden>
Acked-by: Yuchung Cheng <email address hidden>
Signed-off-by: David S. Miller <email address hidden>

CVE-2018-5390

(cherry picked from commit f4a3313d8e2ca9fd8d8f45e40a2903ba782607e7)
Signed-off-by: Tyler Hicks <email address hidden>

(cherry picked from commit 60102d868bf370c3e77e2a6f0fbdb53ec3fe078a xenial)
Signed-off-by: Stefan Bader <email address hidden>

34d224c... by Stefan Bader

Revert "net: increase fragment memory usage limits"

This reverts commit c2a936600f78aea00d3312ea4b66a79a4619f9b4. It
made denial of service attacks on the IP fragment handling easier to
carry out.

CVE-2018-5391

Signed-off-by: Stefan Bader <email address hidden>

e2b4120... by Kees Cook

exec: Limit arg stack to at most 75% of _STK_LIM

CVE-2018-14634

commit da029c11e6b12f321f36dac8771e833b65cec962 upstream.

To avoid pathological stack usage or the need to special-case setuid
execs, just limit all arg stack usage to at most 75% of _STK_LIM (6MB).

Signed-off-by: Kees Cook <email address hidden>
Signed-off-by: Linus Torvalds <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>

(cherry picked from commit d0daa13952a2059b944e826c3c26c920fc3549e6)
Signed-off-by: Stefan Bader <email address hidden>

cc9ec98... by Kees Cook

fs/exec.c: account for argv/envp pointers

CVE-2018-14634

commit 98da7d08850fb8bdeb395d6368ed15753304aa0c upstream.

When limiting the argv/envp strings during exec to 1/4 of the stack limit,
the storage of the pointers to the strings was not included. This means
that an exec with huge numbers of tiny strings could eat 1/4 of the stack
limit in strings and then additional space would be later used by the
pointers to the strings.

For example, on 32-bit with a 8MB stack rlimit, an exec with 1677721
single-byte strings would consume less than 2MB of stack, the max (8MB /
4) amount allowed, but the pointers to the strings would consume the
remaining additional stack space (1677721 * 4 == 6710884).

The result (1677721 + 6710884 == 8388605) would exhaust stack space
entirely. Controlling this stack exhaustion could result in
pathological behavior in setuid binaries (CVE-2017-1000365).

[<email address hidden>: additional commenting from Kees]
Fixes: b6a2fea39318 ("mm: variable length argument support")
Link: http://lkml.kernel.org/r/20170622001720.GA32173@beast
Signed-off-by: Kees Cook <email address hidden>
Acked-by: Rik van Riel <email address hidden>
Acked-by: Michal Hocko <email address hidden>
Cc: Alexander Viro <email address hidden>
Cc: Qualys Security Advisory <email address hidden>
Signed-off-by: Andrew Morton <email address hidden>
Signed-off-by: Linus Torvalds <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

Signed-off-by: Stefan Bader <email address hidden>
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>

(cherry picked from commit ab9e622da2103654d6b6e2a6afd37504b3d38abe xenial)
Signed-off-by: Stefan Bader <email address hidden>

4744d72... by Andrey Konovalov <email address hidden>

dccp: fix freeing skb too early for IPV6_RECVPKTINFO

In the current DCCP implementation an skb for a DCCP_PKT_REQUEST packet
is forcibly freed via __kfree_skb in dccp_rcv_state_process if
dccp_v6_conn_request successfully returns.

However, if IPV6_RECVPKTINFO is set on a socket, the address of the skb
is saved to ireq->pktopts and the ref count for skb is incremented in
dccp_v6_conn_request, so skb is still in use. Nevertheless, it gets freed
in dccp_rcv_state_process.

Fix by calling consume_skb instead of doing goto discard and therefore
calling __kfree_skb.

Similar fixes for TCP:

fb7e2399ec17f1004c0e0ccfd17439f8759ede01 [TCP]: skb is unexpectedly freed.
0aea76d35c9651d55bbaf746e7914e5f9ae5a25d tcp: SYN packets are now
simply consumed

Signed-off-by: Andrey Konovalov <email address hidden>
Acked-by: Eric Dumazet <email address hidden>
Signed-off-by: David S. Miller <email address hidden>

CVE-2017-6074

(cherry-picked from 5edabca9d4cff7f1f2b68f0bac55ef99d9798ba4 davem)
Signed-off-by: Stefan Bader <email address hidden>

(cherry picked from commit 4feb04ade2a559e0e76a0215d259c5673e5b1cbd xenial)
Signed-off-by: Stefan Bader <email address hidden>

e8d4541... by tglx

posix-timer: Properly check sigevent->sigev_notify

CVE-2017-18344

commit cef31d9af908243421258f1df35a4a644604efbe upstream.

timer_create() specifies via sigevent->sigev_notify the signal delivery for
the new timer. The valid modes are SIGEV_NONE, SIGEV_SIGNAL, SIGEV_THREAD
and (SIGEV_SIGNAL | SIGEV_THREAD_ID).

The sanity check in good_sigevent() is only checking the valid combination
for the SIGEV_THREAD_ID bit, i.e. SIGEV_SIGNAL, but if SIGEV_THREAD_ID is
not set it accepts any random value.

This has no real effects on the posix timer and signal delivery code, but
it affects show_timer() which handles the output of /proc/$PID/timers. That
function uses a string array to pretty print sigev_notify. The access to
that array has no bound checks, so random sigev_notify cause access beyond
the array bounds.

Add proper checks for the valid notify modes and remove the SIGEV_THREAD_ID
masking from various code pathes as SIGEV_NONE can never be set in
combination with SIGEV_THREAD_ID.

Reported-by: Eric Biggers <email address hidden>
Reported-by: Dmitry Vyukov <email address hidden>
Reported-by: Alexey Dobriyan <email address hidden>
Signed-off-by: Thomas Gleixner <email address hidden>
Cc: John Stultz <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
Signed-off-by: Juerg Haefliger <email address hidden>

(cherry picked from commit 28dae3669fdce3bdace815e78a17ea329ba3c5df xenial)
Signed-off-by: Stefan Bader <email address hidden>