~sforshee/ubuntu/+source/linux/+git/eoan:lockdown-updates

Last commit made on 2020-06-16
Get this branch:
git clone -b lockdown-updates https://git.launchpad.net/~sforshee/ubuntu/+source/linux/+git/eoan
Only Seth Forshee can upload to this branch. If you are Seth Forshee please log in for upload directions.

Branch merges

Branch information

Name:
lockdown-updates
Repository:
lp:~sforshee/ubuntu/+source/linux/+git/eoan

Recent commits

af386aa... by Jason A. Donenfeld

UBUNTU: SAUCE: acpi: disallow loading configfs acpi tables when locked down

Like other vectors already patched, this one here allows the root user
to load ACPI tables, which enables arbitrary physical address writes,
which in turn makes it possible to disable lockdown. This patch prevents
this by checking the lockdown status before allowing a new ACPI table to be
installed. The link in the trailer shows a PoC of how this might be
used.

Signed-off-by: Jason A. Donenfeld <email address hidden>
Cc: <email address hidden>
Link: https://git.zx2c4.com/american-unsigned-language/tree/american-unsigned-language-2.sh
Link: https://<email address hidden>/
[ saf: Backport to older lockdown implementation ]
Signed-off-by: Seth Forshee <email address hidden>

ce078e8... by "Christopher M. Riedl" <email address hidden>

powerpc/xmon: Restrict when kernel is locked down

Xmon should be either fully or partially disabled depending on the
kernel lockdown state.

Put xmon into read-only mode for lockdown=integrity and prevent user
entry into xmon when lockdown=confidentiality. Xmon checks the lockdown
state on every attempted entry:

 (1) during early xmon'ing

 (2) when triggered via sysrq

 (3) when toggled via debugfs

 (4) when triggered via a previously enabled breakpoint

The following lockdown state transitions are handled:

 (1) lockdown=none -> lockdown=integrity
     set xmon read-only mode

 (2) lockdown=none -> lockdown=confidentiality
     clear all breakpoints, set xmon read-only mode,
     prevent user re-entry into xmon

 (3) lockdown=integrity -> lockdown=confidentiality
     clear all breakpoints, set xmon read-only mode,
     prevent user re-entry into xmon

Suggested-by: Andrew Donnellan <email address hidden>
Signed-off-by: Christopher M. Riedl <email address hidden>
Signed-off-by: Michael Ellerman <email address hidden>
Link: https://<email address hidden>
(backported from commit 69393cb03ccdf29f3b452d3482ef918469d1c098)
Signed-off-by: Seth Forshee <email address hidden>

2d2789d... by Matthew Garrett <email address hidden>

efi: Restrict efivar_ssdt_load when the kernel is locked down

efivar_ssdt_load allows the kernel to import arbitrary ACPI code from an
EFI variable, which gives arbitrary code execution in ring 0. Prevent
that when the kernel is locked down.

Signed-off-by: Matthew Garrett <email address hidden>
Acked-by: Ard Biesheuvel <email address hidden>
Reviewed-by: Kees Cook <email address hidden>
Cc: Ard Biesheuvel <email address hidden>
Cc: <email address hidden>
Signed-off-by: James Morris <email address hidden>
(backported from commit 1957a85b0032a81e6482ca4aab883643b8dae06e)
Reported-by: Jason A. Donenfeld <email address hidden>
Signed-off-by: Seth Forshee <email address hidden>

b8719ff... by Javier Martinez Canillas <email address hidden>

efi/efi_test: Lock down /dev/efi_test and require CAP_SYS_ADMIN

The driver exposes EFI runtime services to user-space through an IOCTL
interface, calling the EFI services function pointers directly without
using the efivar API.

Disallow access to the /dev/efi_test character device when the kernel is
locked down to prevent arbitrary user-space to call EFI runtime services.

Also require CAP_SYS_ADMIN to open the chardev to prevent unprivileged
users to call the EFI runtime services, instead of just relying on the
chardev file mode bits for this.

The main user of this driver is the fwts [0] tool that already checks if
the effective user ID is 0 and fails otherwise. So this change shouldn't
cause any regression to this tool.

[0]: https://wiki.ubuntu.com/FirmwareTestSuite/Reference/uefivarinfo

Signed-off-by: Javier Martinez Canillas <email address hidden>
Signed-off-by: Ard Biesheuvel <email address hidden>
Acked-by: Laszlo Ersek <email address hidden>
Acked-by: Matthew Garrett <email address hidden>
Cc: Linus Torvalds <email address hidden>
Cc: Peter Zijlstra <email address hidden>
Cc: Thomas Gleixner <email address hidden>
Cc: <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Ingo Molnar <email address hidden>
(backported from commit 359efcc2c910117d2faf704ce154e91fc976d37f)
Signed-off-by: Seth Forshee <email address hidden>

de091bb... by Marcelo Cerri

UBUNTU: Ubuntu-5.3.0-60.54

Signed-off-by: Marcelo Henrique Cerri <email address hidden>

4ba6ab5... by Thadeu Lima de Souza Cascardo

UBUNTU/SAUCE: x86/speculation/srbds: do not try to turn mitigation off when not supported

When SRBDS is mitigated by TSX OFF, update_srbds_msr will still read and
write to MSR_IA32_MCU_OPT_CTRL even when that is not supported by the
microcode.

Checking for X86_FEATURE_SRBDS_CTRL as a CPU feature available makes more
sense than checking for SRBDS_MITIGATION_UCODE_NEEDED as the the found
"mitigation".

CVE-2020-0543
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: John Johansen <email address hidden>
Acked-by: Steve Beattie <email address hidden>
Signed-off-by: Kleber Sacilotto de Souza <email address hidden>
Signed-off-by: Marcelo Henrique Cerri <email address hidden>

50cb28b... by Marcelo Cerri

UBUNTU: [Packaging] update helper scripts

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Marcelo Henrique Cerri <email address hidden>

278fdb9... by Kamal Mostafa

UBUNTU: upstream stable to v4.19.125, v5.4.43

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

Ignore: yes
Signed-off-by: Kamal Mostafa <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

bccaf31... by Phil Auld <email address hidden>

sched/fair: Fix enqueue_task_fair() warning some more

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

[ Upstream commit b34cb07dde7c2346dec73d053ce926aeaa087303 ]

sched/fair: Fix enqueue_task_fair warning some more

The recent patch, fe61468b2cb (sched/fair: Fix enqueue_task_fair warning)
did not fully resolve the issues with the rq->tmp_alone_branch !=
&rq->leaf_cfs_rq_list warning in enqueue_task_fair. There is a case where
the first for_each_sched_entity loop exits due to on_rq, having incompletely
updated the list. In this case the second for_each_sched_entity loop can
further modify se. The later code to fix up the list management fails to do
what is needed because se does not point to the sched_entity which broke out
of the first loop. The list is not fixed up because the throttled parent was
already added back to the list by a task enqueue in a parallel child hierarchy.

Address this by calling list_add_leaf_cfs_rq if there are throttled parents
while doing the second for_each_sched_entity loop.

Fixes: fe61468b2cb ("sched/fair: Fix enqueue_task_fair warning")
Suggested-by: Vincent Guittot <email address hidden>
Signed-off-by: Phil Auld <email address hidden>
Signed-off-by: Peter Zijlstra (Intel) <email address hidden>
Reviewed-by: Dietmar Eggemann <email address hidden>
Reviewed-by: Vincent Guittot <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Sasha Levin <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>

c1cf845... by Vincent Guittot

sched/fair: Fix reordering of enqueue/dequeue_task_fair()

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

[ Upstream commit 5ab297bab984310267734dfbcc8104566658ebef ]

Even when a cgroup is throttled, the group se of a child cgroup can still
be enqueued and its gse->on_rq stays true. When a task is enqueued on such
child, we still have to update the load_avg and increase
h_nr_running of the throttled cfs. Nevertheless, the 1st
for_each_sched_entity() loop is skipped because of gse->on_rq == true and the
2nd loop because the cfs is throttled whereas we have to update both
load_avg with the old h_nr_running and increase h_nr_running in such case.

The same sequence can happen during dequeue when se moves to parent before
breaking in the 1st loop.

Note that the update of load_avg will effectively happen only once in order
to sync up to the throttled time. Next call for updating load_avg will stop
early because the clock stays unchanged.

Signed-off-by: Vincent Guittot <email address hidden>
Signed-off-by: Peter Zijlstra (Intel) <email address hidden>
Signed-off-by: Ingo Molnar <email address hidden>
Fixes: 6d4d22468dae ("sched/fair: Reorder enqueue/dequeue_task_fair path")
Link: https://<email address hidden>
Signed-off-by: Sasha Levin <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>