跳转到帖子

Amazon Linux 2023: CVE-2024-49861: Important priority package update for kernel

recommended_posts

发布于
  • Members

Amazon Linux 2023: CVE-2024-49861: Important priority package update for kernel

Severity
4
CVSS
(AV:L/AC:L/Au:M/C:N/I:N/A:C)
Published
10/21/2024
Created
02/05/2025
Added
02/14/2025
Modified
02/14/2025

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix helper writes to read-only maps Lonial found an issue that despite user- and BPF-side frozen BPF map (like in case of .rodata), it was still possible to write into it from a BPF program side through specific helpers having ARG_PTR_TO_{LONG,INT} as arguments. In check_func_arg() when the argument is as mentioned, the meta->raw_mode is never set. Later, check_helper_mem_access(), under the case of PTR_TO_MAP_VALUE as register base type, it assumes BPF_READ for the subsequent call to check_map_access_type() and given the BPF map is read-only it succeeds. The helpers really need to be annotated as ARG_PTR_TO_{LONG,INT} | MEM_UNINIT when results are written into them as opposed to read out of them. The latter indicates that it's okay to pass a pointer to uninitialized memory as the memory is written to anyway. However, ARG_PTR_TO_{LONG,INT} is a special case of ARG_PTR_TO_FIXED_SIZE_MEM just with additional alignment requirement. So it is better to just get rid of the ARG_PTR_TO_{LONG,INT} special cases altogether and reuse the fixed size memory types. For this, add MEM_ALIGNED to additionally ensure alignment given these helpers write directly into the args via *<ptr> = val. The .arg*_size has been initialized reflecting the actual sizeof(*<ptr>). MEM_ALIGNED can only be used in combination with MEM_FIXED_SIZE annotated argument types, since in !MEM_FIXED_SIZE cases the verifier does not know the buffer size a priori and therefore cannot blindly write *<ptr> = val.

Solution(s)

  • amazon-linux-2023-upgrade-bpftool
  • amazon-linux-2023-upgrade-bpftool-debuginfo
  • amazon-linux-2023-upgrade-kernel
  • amazon-linux-2023-upgrade-kernel-debuginfo
  • amazon-linux-2023-upgrade-kernel-debuginfo-common-aarch64
  • amazon-linux-2023-upgrade-kernel-debuginfo-common-x86-64
  • amazon-linux-2023-upgrade-kernel-devel
  • amazon-linux-2023-upgrade-kernel-headers
  • amazon-linux-2023-upgrade-kernel-libbpf
  • amazon-linux-2023-upgrade-kernel-libbpf-devel
  • amazon-linux-2023-upgrade-kernel-libbpf-static
  • amazon-linux-2023-upgrade-kernel-livepatch-6-1-124-134-200
  • amazon-linux-2023-upgrade-kernel-modules-extra
  • amazon-linux-2023-upgrade-kernel-modules-extra-common
  • amazon-linux-2023-upgrade-kernel-tools
  • amazon-linux-2023-upgrade-kernel-tools-debuginfo
  • amazon-linux-2023-upgrade-kernel-tools-devel
  • amazon-linux-2023-upgrade-perf
  • amazon-linux-2023-upgrade-perf-debuginfo
  • amazon-linux-2023-upgrade-python3-perf
  • amazon-linux-2023-upgrade-python3-perf-debuginfo

References

  • https://attackerkb.com/topics/cve-2024-49861
  • CVE - 2024-49861
  • https://alas.aws.amazon.com/AL2023/ALAS-2025-809.html
  • 查看数 698
  • 已创建
  • 最后回复

参与讨论

你可立刻发布并稍后注册。 如果你有帐户,立刻登录发布帖子。

游客
回帖…