ALAS2022-2022-039

Related Vulnerabilities: CVE-2022-0001   CVE-2022-0002   CVE-2022-0847  

Amazon Linux has been made aware of a potential Branch Target Injection (BTI) issue (sometimes referred to as Spectre variant 2). This is a known cross-domain transient execution attack where a third party may seek to cause a disclosure gadget to be speculatively executed after an indirect branch prediction. Generally, actors who attempt transient execution attacks do not have access to the data on the hosts they attempt to access (e.g. where privilege-level isolation is in place). For such attacks to succeed, actors need to be able to run code on the (virtual) machine hosting the data in which they are interested. To mitigate this issue, Amazon Linux recommends that customers disable unprivileged eBPF. This configuration, having the unprivileged eBPF disabled, is the current default for most Linux distributions and as of this advisory, is also the default for all Amazon Linux kernels. Specific mitigations for various CPUs are listed below. Intel CPUs: For Intel CPUs, this applies to all instance types that have CPUs with eIBRS support. They are: *6i* (all sizes), c5d.metal, c5.metal, g4dn.metal, i3en.metal, m5*.metal, r5*.metal Vectors outside of unprivileged eBPF are not currently known, and Intel recommends disabling unprivileged BPF, as mentioned above. However, optionally enabling "spectre_v2=eibrs,lfence" on Linux kernel command line on the instance types mentioned above, would provide additional protection. AMD CPUs:As part of the investigation triggered by this issue, AMD now recommends using a different software mitigation inside the Linux kernel, which the Amazon Linux kernel is enabling by default. This means that the Linux kernel will use the generic retpoline software mitigation, instead of the specialized AMD one, on AMD instances (*5a*). This is done by default, and no administrator action is needed. ARM CPUs:The Amazon Linux kernel now enables, by default, a software mitigation for this issue, on all ARM-based EC2 instance types. Non-transparent sharing of branch predictor selectors between contexts in some Intel(R) Processors may allow an authorized user to potentially enable information disclosure. (CVE-2022-0001) Non-transparent sharing of branch predictor within a context in some Intel(r) Processors may allow an authorized user to potentially enable information disclosure via local access. (CVE-2022-0002) A flaw was found in the way the "flags" member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe and push_pipe functions in the Linux kernel and could thus contain stale values. An unprivileged local user could use this flaw to write to pages in the page cache backed by read only files and as such escalate their privileges on the system. (CVE-2022-0847)

ALAS2022-2022-039


Amazon Linux 2022 Security Advisory: ALAS-2022-039
Advisory Release Date: 2022-03-07 23:59 Pacific
Advisory Updated Date: 2022-03-08 19:28 Pacific
Severity: Important

Issue Overview:

Amazon Linux has been made aware of a potential Branch Target Injection (BTI) issue (sometimes referred to as Spectre variant 2). This is a known cross-domain transient execution attack where a third party may seek to cause a disclosure gadget to be speculatively executed after an indirect branch prediction. Generally, actors who attempt transient execution attacks do not have access to the data on the hosts they attempt to access (e.g. where privilege-level isolation is in place). For such attacks to succeed, actors need to be able to run code on the (virtual) machine hosting the data in which they are interested.

To mitigate this issue, Amazon Linux recommends that customers disable unprivileged eBPF. This configuration, having the unprivileged eBPF disabled, is the current default for most Linux distributions and as of this advisory, is also the default for all Amazon Linux kernels.

Specific mitigations for various CPUs are listed below.

Intel CPUs:
For Intel CPUs, this applies to all instance types that have CPUs with eIBRS support. They are:
*6i* (all sizes), c5d.metal, c5.metal, g4dn.metal, i3en.metal, m5*.metal, r5*.metal

Vectors outside of unprivileged eBPF are not currently known, and Intel recommends disabling unprivileged BPF, as mentioned above. However, optionally enabling "spectre_v2=eibrs,lfence" on Linux kernel command line on the instance types mentioned above, would provide additional protection.

AMD CPUs:
As part of the investigation triggered by this issue, AMD now recommends using a different software mitigation inside the Linux kernel, which the Amazon Linux kernel is enabling by default. This means that the Linux kernel will use the generic retpoline software mitigation, instead of the specialized AMD one, on AMD instances (*5a*). This is done by default, and no administrator action is needed.

ARM CPUs:
The Amazon Linux kernel now enables, by default, a software mitigation for this issue, on all ARM-based EC2 instance types.


Non-transparent sharing of branch predictor selectors between contexts in some Intel(R) Processors may allow an authorized user to potentially enable information disclosure. (CVE-2022-0001)

Non-transparent sharing of branch predictor within a context in some Intel(r) Processors may allow an authorized user to potentially enable information disclosure via local access. (CVE-2022-0002)

A flaw was found in the way the "flags" member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe and push_pipe functions in the Linux kernel and could thus contain stale values. An unprivileged local user could use this flaw to write to pages in the page cache backed by read only files and as such escalate their privileges on the system. (CVE-2022-0847)


Affected Packages:

kernel


Issue Correction:
Run dnf update --releasever=2022.0.20220308 kernel to update your system.

New Packages:
aarch64:
    bpftool-5.15.25-14.106.amzn2022.aarch64
    python3-perf-5.15.25-14.106.amzn2022.aarch64
    python3-perf-debuginfo-5.15.25-14.106.amzn2022.aarch64
    bpftool-debuginfo-5.15.25-14.106.amzn2022.aarch64
    kernel-livepatch-5.15.25-14.106-1.0-0.amzn2022.aarch64
    kernel-tools-5.15.25-14.106.amzn2022.aarch64
    kernel-headers-5.15.25-14.106.amzn2022.aarch64
    kernel-tools-devel-5.15.25-14.106.amzn2022.aarch64
    perf-debuginfo-5.15.25-14.106.amzn2022.aarch64
    kernel-tools-debuginfo-5.15.25-14.106.amzn2022.aarch64
    perf-5.15.25-14.106.amzn2022.aarch64
    kernel-5.15.25-14.106.amzn2022.aarch64
    kernel-debuginfo-5.15.25-14.106.amzn2022.aarch64
    kernel-debuginfo-common-aarch64-5.15.25-14.106.amzn2022.aarch64
    kernel-devel-5.15.25-14.106.amzn2022.aarch64

i686:
    kernel-headers-5.15.25-14.106.amzn2022.i686

src:
    kernel-5.15.25-14.106.amzn2022.src

x86_64:
    python3-perf-debuginfo-5.15.25-14.106.amzn2022.x86_64
    kernel-livepatch-5.15.25-14.106-1.0-0.amzn2022.x86_64
    bpftool-5.15.25-14.106.amzn2022.x86_64
    perf-5.15.25-14.106.amzn2022.x86_64
    kernel-headers-5.15.25-14.106.amzn2022.x86_64
    kernel-tools-debuginfo-5.15.25-14.106.amzn2022.x86_64
    bpftool-debuginfo-5.15.25-14.106.amzn2022.x86_64
    perf-debuginfo-5.15.25-14.106.amzn2022.x86_64
    kernel-tools-devel-5.15.25-14.106.amzn2022.x86_64
    python3-perf-5.15.25-14.106.amzn2022.x86_64
    kernel-debuginfo-5.15.25-14.106.amzn2022.x86_64
    kernel-5.15.25-14.106.amzn2022.x86_64
    kernel-tools-5.15.25-14.106.amzn2022.x86_64
    kernel-debuginfo-common-x86_64-5.15.25-14.106.amzn2022.x86_64
    kernel-devel-5.15.25-14.106.amzn2022.x86_64