Amazon Linux 2023:bpftool、kernel、kernel-devel (ALAS2023-2024-519)

high Nessus Plugin ID 190728

概要

遠端 Amazon Linux 2023 主機缺少一個安全性更新。

說明

因此,會受到 ALAS2023-2024-519 公告中所提及的多個弱點影響。

2024-07-03:已將 CVE-2024-26631 新增至此公告。

2024-07-03:已將 CVE-2024-26632 新增至此公告。

2024-07-03:已將 CVE-2023-52610 新增至此公告。

2024-07-03:已將 CVE-2024-26633 新增至此公告。

2024-07-03:已將 CVE-2023-52612 新增至此公告。

2024-06-06:已將 CVE-2023-52698 新增至此公告。

2024-04-25:已將 CVE-2023-52462 新增至此公告。

2024-04-25:已將 CVE-2024-26591 新增至此公告。

2024-04-25:已將 CVE-2023-52467 新增至此公告。

2024-04-25:已將 CVE-2023-52458 新增至此公告。

2024-04-25:已將 CVE-2023-52447 新增至此公告。

2024-04-10:已將 CVE-2024-26598 新增至此公告。

2024-03-27:已將 CVE-2023-52439 新增至此公告。

2024-03-13:已將 CVE-2023-52463 新增至此公告。

2024-03-13:已將 CVE-2024-26589 新增至此公告。

2024-02-29:已將 CVE-2023-6915 新增至此公告。

2024-02-29:已將 CVE-2023-46838 新增至此公告。

在 Xen 中發現一個瑕疵。非特權來賓可藉由傳送網路封包至後端來造成主機拒絕服務 (DoS),進而導致後端損毀。(CVE-2023-46838)

在 Linux 核心中,下列弱點已解決:

uio:修復 uio_open 中的釋放後使用弱點

core-1 core-2------------------------------------------------------- uio_unregister_device uio_openidev = idr_find()device_unregister(&idev->dev)put_device(&idev->dev)uio_device_releaseget_device(&idev->dev)kfree(idev)uio_free_minor(minor)uio_releaseput_device(&idev->dev)kfree(idev)-------------------------------------------------------

在 core-1 uio_unregister_device() 中,若 idev->dev kobject ref 為 1,device_unregister 將 kfreeidev。但在執行 core-1device_unregister、put_device 與 kfree 之間,core-2 可能會 get_device。
然後:1. 在 core-1 kfree idev 之後,core-2 會為 idev 執行釋放後使用。2. core-2 執行 uio_release 和 put_device 時,idev 將被重複釋放。

若要解決此問題,我們可以透過 minor_lock 取得 idev atomic 和 inc idev 參照。(CVE-2023-52439)

在 Linux 核心中,下列弱點已解決:

bpf:必要時延遲釋放內部對應

在更新或刪除對應陣列或對應 htab 時,非可睡眠程式或睡眠程式仍可存取這些對應。但是,若 ref-counter 排在最后 (大多數情況下為 true),bpf_map_fd_put_ptr() 會直接透過 bpf_map_put() 減少內部對應的 ref-counter,並且內部對應將被 kworker 中的 ops->map_free() 釋放。但目前,大多數 .map_free() 回呼並未使用 synchronize_rcu() 或其變體來等待 RCU 寬限期過去,因此在 ops->map_free 叫用完成後,存取內部對應的 bpf 程式可能會引發釋放後使用問題。

透過在一個 RCU 寬限期和一個工作追蹤 RCU 寬限期之後呼叫 bpf_map_free_deferred() (若之前已從外部對應中刪除內部對應),修復內部對應釋放。若要釋放 bpf 對應的最後一個 ref-counter,可使用 call_rcu() 或 call_rcu_tasks_trace() 來達到延遲釋放的目的。bpf_map 中新增的 rcu_head 欄位與 work 欄位共用同一儲存空間,以減小 bpf_map 的大小。(CVE-2023-52447)

在 Linux 核心中,下列弱點已解決:

block:新增分割區長度必須與區塊大小對齊的檢查

在呼叫新增分割區或調整分割區大小前,沒有檢查長度是否與邏輯區塊大小對齊。若磁碟的邏輯區塊大小大於 512 位元組,則磁碟分割大小可能不是邏輯區塊大小的倍數。此外,讀取最後一個磁區時,bio_truncate() 會調整 bio 大小,若讀取命令的大小小於邏輯區塊的大小,則會導致 IO 错误。若支援完整性資料,這還將導致呼叫 bio_integrity_free 時發生 Null 指標解除參照。(CVE-2023-52458)

在 Linux 核心中,下列弱點已解決:

bpf:修復嘗試損毀溢位指標的檢查 (CVE-2023-52462)

在 Linux 核心中,下列弱點已修復:efivarfs:如果不支援 SetVariable,在重新掛載時會強制執行 RO 若韌體不支援執行階段的 SetVariable,我們絕不會為該函式指派回呼。同時將 efivarfs 掛載為 RO,讓任何人都無法呼叫。但是,我們從不會檢查權限旗標,除非有人將檔案系統掛載為 RW。因此,這會導致當機 (CVE-2023-52463)

在 Linux 核心中,下列弱點已解決:

mfd:syscon:修復 of_syscon_register() 中的 Null 指標解除參照弱點

kasprintf() 會傳回動態配置記憶體的指標,失敗時該指標可為 NULL。
(CVE-2023-52467)

在 Linux 核心中,下列弱點已解決:

net/sched:act_ct:修正 ooo 片段上的 skb 洩漏和損毀問題 (CVE-2023-52610)

在 Linux 核心中,下列弱點已解決:

crypto:scomp - 修正 req->dst 緩衝區溢位 (CVE-2023-52612)

在 Linux 核心中,下列弱點已解決:

calipso:修復 netlbl_calipso_add_pass() 中的記憶體流失弱點 (CVE-2023-52698)

在 Linux 核心中,發現 lib/idr.c 的 ida_free 存在 NULL 指標解除參照問題。此問題可能允許使用此程式庫的攻擊者因函式傳回時遺漏檢查而造成拒絕服務弱點。(CVE-2023-6915)

Linux 核心的 netfilter: nf_tables 元件中存在釋放後使用弱點,攻擊者可利用此弱點來提升本機權限。

在釋放之前,nft_setelem_catchall_deactivate() 函式會檢查全能集元素在目前的世代中是否處於作用中狀態,而非在新一代中,但該函式只會在新一代中將其標示為非作用,因而可能多次釋放該元素,進而導致一個重複釋放弱點。

我們建議升級過去的 commit b1db244ffd041a49ecc9618e8feb6b5c1afcdaa7。(CVE-2024-1085)

在 Linux 核心中,下列弱點已解決:

bpf:拒絕 PTR_TO_FLOW_KEYS 上的變數位移 alu

check_flow_keys_access() 會導致超出邊界存取。針對 PTR_TO_FLOW_KEYS,check_flow_keys_access() 僅使用修復後的 off 進行驗證。不過,未針對此 ptr 類別禁止變數位移 ptr alu。因此,系統不會檢查變數位移。(CVE-2024-26589)

bpf:修復 bpf_tracing_prog_attach 中的重新附加分支問題

因缺少 attach_btf,下列情況可造成當機:

1) 載入 rawtp 程式 2) 載入將 rawtp 做為 target_fd 的 fentry 程式 3) 使用 target_fd = 0 為 fentry 程式建立追蹤連結 4) 重複 3 (CVE-2024-26591)

在 Linux 核心中,下列弱點已解決:

KVM:arm64:vgic-its:避免 LPI 轉譯快取中可能發生的 UAF (CVE-2024-26598)

在 Linux 核心中,下列弱點已解決:

ipv6:mcast:修正 ipv6_mc_down / mld_ifc_work 中的資料爭用 (CVE-2024-26631)

在 Linux 核心中,下列弱點已解決:

block:修正使用 bio_for_each_folio_all 迭代空白 bio 的問題 (CVE-2024-26632)

在 Linux 核心中,下列弱點已解決:

ip6_tunnel:修正 ip6_tnl_parse_tlv_enc_lim() 中的 NEXTHDR_FRAGMENT 處理 (CVE-2024-26633)

Tenable 已直接從所測試產品的安全公告擷取前置描述區塊。

請注意,Nessus 並未測試這些問題,而是僅依據應用程式自我報告的版本號碼作出判斷。

解決方案

執行「dnf update kernel --releasever 2023.3.20240219」以更新系統。

另請參閱

https://alas.aws.amazon.com/AL2023/ALAS-2024-519.html

https://alas.aws.amazon.com/faqs.html

https://alas.aws.amazon.com/cve/html/CVE-2023-46838.html

https://alas.aws.amazon.com/cve/html/CVE-2023-52439.html

https://alas.aws.amazon.com/cve/html/CVE-2023-52447.html

https://alas.aws.amazon.com/cve/html/CVE-2023-52458.html

https://alas.aws.amazon.com/cve/html/CVE-2023-52462.html

https://alas.aws.amazon.com/cve/html/CVE-2023-52463.html

https://alas.aws.amazon.com/cve/html/CVE-2023-52467.html

https://alas.aws.amazon.com/cve/html/CVE-2023-52610.html

https://alas.aws.amazon.com/cve/html/CVE-2023-52612.html

https://alas.aws.amazon.com/cve/html/CVE-2023-52698.html

https://alas.aws.amazon.com/cve/html/CVE-2023-6915.html

https://alas.aws.amazon.com/cve/html/CVE-2024-1085.html

https://alas.aws.amazon.com/cve/html/CVE-2024-26589.html

https://alas.aws.amazon.com/cve/html/CVE-2024-26591.html

https://alas.aws.amazon.com/cve/html/CVE-2024-26598.html

https://alas.aws.amazon.com/cve/html/CVE-2024-26631.html

https://alas.aws.amazon.com/cve/html/CVE-2024-26632.html

https://alas.aws.amazon.com/cve/html/CVE-2024-26633.html

Plugin 詳細資訊

嚴重性: High

ID: 190728

檔案名稱: al2023_ALAS2023-2024-519.nasl

版本: 1.8

類型: local

代理程式: unix

已發布: 2024/2/20

已更新: 2024/7/4

支援的感應器: Frictionless Assessment AWS, Frictionless Assessment Agent, Nessus Agent, Agentless Assessment, Nessus

風險資訊

VPR

風險因素: Medium

分數: 6.7

CVSS v2

風險因素: Medium

基本分數: 6.8

時間分數: 5

媒介: CVSS2#AV:L/AC:L/Au:S/C:C/I:C/A:C

CVSS 評分資料來源: CVE-2024-26598

CVSS v3

風險因素: High

基本分數: 7.8

時間分數: 6.8

媒介: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

時間媒介: CVSS:3.0/E:U/RL:O/RC:C

弱點資訊

CPE: p-cpe:/a:amazon:linux:kernel-modules-extra-common, p-cpe:/a:amazon:linux:perf-debuginfo, p-cpe:/a:amazon:linux:kernel-modules-extra, p-cpe:/a:amazon:linux:kernel-debuginfo-common-aarch64, p-cpe:/a:amazon:linux:kernel-tools, p-cpe:/a:amazon:linux:python3-perf, p-cpe:/a:amazon:linux:kernel-libbpf-static, p-cpe:/a:amazon:linux:kernel-debuginfo, p-cpe:/a:amazon:linux:kernel-libbpf, p-cpe:/a:amazon:linux:bpftool-debuginfo, p-cpe:/a:amazon:linux:kernel-livepatch-6.1.75-99.163, p-cpe:/a:amazon:linux:kernel-libbpf-devel, p-cpe:/a:amazon:linux:kernel-headers, p-cpe:/a:amazon:linux:kernel-tools-devel, cpe:/o:amazon:linux:2023, p-cpe:/a:amazon:linux:perf, p-cpe:/a:amazon:linux:bpftool, p-cpe:/a:amazon:linux:kernel-tools-debuginfo, p-cpe:/a:amazon:linux:kernel-devel, p-cpe:/a:amazon:linux:kernel, p-cpe:/a:amazon:linux:python3-perf-debuginfo, p-cpe:/a:amazon:linux:kernel-debuginfo-common-x86_64

必要的 KB 項目: Host/local_checks_enabled, Host/AmazonLinux/release, Host/AmazonLinux/rpm-list

可輕鬆利用: No known exploits are available

修補程式發佈日期: 2024/2/15

弱點發布日期: 2024/1/31

參考資訊

CVE: CVE-2023-46838, CVE-2023-52439, CVE-2023-52447, CVE-2023-52458, CVE-2023-52462, CVE-2023-52463, CVE-2023-52467, CVE-2023-52610, CVE-2023-52612, CVE-2023-52698, CVE-2023-6915, CVE-2024-1085, CVE-2024-26589, CVE-2024-26591, CVE-2024-26598, CVE-2024-26631, CVE-2024-26632, CVE-2024-26633