diff options
author | Hitendra Prajapati <hprajapati@mvista.com> | 2025-02-20 09:35:16 +0530 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2025-02-28 06:45:14 -0800 |
commit | dd272ac230b38e23fed14de17fbca62aec687d3b (patch) | |
tree | 5314eb078c00e6c60ac7bb539e0c616fcfd7ffbc | |
parent | c72b542224ec9e0798b202f195f1ad34f1e04ab5 (diff) | |
download | poky-dd272ac230b38e23fed14de17fbca62aec687d3b.tar.gz |
libcap: fix CVE-2025-1390
Upstream-Status: Backport from https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=1ad42b66c3567481cc5fa22fc1ba1556a316d878
(From OE-Core rev: b975db55f6e0d551e69c870620292b58425f9aab)
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | meta/recipes-support/libcap/files/CVE-2025-1390.patch | 36 | ||||
-rw-r--r-- | meta/recipes-support/libcap/libcap_2.69.bb | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-support/libcap/files/CVE-2025-1390.patch b/meta/recipes-support/libcap/files/CVE-2025-1390.patch new file mode 100644 index 0000000000..a0f7dda503 --- /dev/null +++ b/meta/recipes-support/libcap/files/CVE-2025-1390.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 1ad42b66c3567481cc5fa22fc1ba1556a316d878 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> | ||
3 | Date: Mon, 17 Feb 2025 10:31:55 +0800 | ||
4 | Subject: pam_cap: Fix potential configuration parsing error | ||
5 | |||
6 | The current configuration parsing does not actually skip user names | ||
7 | that do not start with @, but instead treats the name as a group | ||
8 | name for further parsing, which can result in matching unexpected | ||
9 | capability sets and may trigger potential security issues. Only | ||
10 | names starting with @ should be parsed as group names. | ||
11 | |||
12 | Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> | ||
13 | Signed-off-by: Andrew G. Morgan <morgan@kernel.org> | ||
14 | |||
15 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=1ad42b66c3567481cc5fa22fc1ba1556a316d878] | ||
16 | CVE: CVE-2025-1390 | ||
17 | Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> | ||
18 | --- | ||
19 | pam_cap/pam_cap.c | 1 + | ||
20 | 1 file changed, 1 insertion(+) | ||
21 | |||
22 | diff --git a/pam_cap/pam_cap.c b/pam_cap/pam_cap.c | ||
23 | index b9419cb..18647a1 100644 | ||
24 | --- a/pam_cap/pam_cap.c | ||
25 | +++ b/pam_cap/pam_cap.c | ||
26 | @@ -166,6 +166,7 @@ static char *read_capabilities_for_user(const char *user, const char *source) | ||
27 | |||
28 | if (line[0] != '@') { | ||
29 | D(("user [%s] is not [%s] - skipping", user, line)); | ||
30 | + continue; | ||
31 | } | ||
32 | |||
33 | int i; | ||
34 | -- | ||
35 | 2.25.1 | ||
36 | |||
diff --git a/meta/recipes-support/libcap/libcap_2.69.bb b/meta/recipes-support/libcap/libcap_2.69.bb index 92fa766d37..03975b44a0 100644 --- a/meta/recipes-support/libcap/libcap_2.69.bb +++ b/meta/recipes-support/libcap/libcap_2.69.bb | |||
@@ -15,6 +15,7 @@ DEPENDS = "hostperl-runtime-native gperf-native" | |||
15 | SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \ | 15 | SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \ |
16 | file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \ | 16 | file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \ |
17 | file://0002-tests-do-not-run-target-executables.patch \ | 17 | file://0002-tests-do-not-run-target-executables.patch \ |
18 | file://CVE-2025-1390.patch \ | ||
18 | " | 19 | " |
19 | SRC_URI:append:class-nativesdk = " \ | 20 | SRC_URI:append:class-nativesdk = " \ |
20 | file://0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch \ | 21 | file://0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch \ |