Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
a4a4879186
!23 【openEuler-20.03-LTS-SP4】acl_copy_entry prevent accidental NULL pointer dereferences
From: @yixiangzhike 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-07-10 07:21:16 +00:00
yixiangzhike
21e6f9d8bd acl_copy_entry prevent accidental NULL pointer dereferences 2024-07-10 11:02:37 +08:00
openeuler-ci-bot
de7742b5b9
!17 [sync] PR-14: remove rpath and runpath of exec files and libraries
From: @openeuler-sync-bot 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
2022-12-20 02:54:31 +00:00
zhangruifang2020
1a8a435fb4 remove rpath and runpath of exec files and libraries
(cherry picked from commit cab9f98329a8e6393113319193e020618acc7319)
2022-12-15 09:10:02 +08:00
openeuler-ci-bot
022fcf75bc !8 change release version for rebuild
Merge pull request !8 from chenyaqiang/master
2020-08-18 20:01:59 +08:00
chenyaqiang
3f5cae7277 rebuild for requirement packfage 2020-08-18 19:34:37 +08:00
openeuler-ci-bot
9f8f6eecba !7 add yaml file for acl
Merge pull request !7 from xu_ping/master
2020-06-22 17:17:52 +08:00
cherry530
ddcf2fef88 add yaml file 2020-06-18 16:15:48 +08:00
openeuler-ci-bot
5ede4361dc !3 acl
Merge pull request !3 from syyhao/dev212
2020-02-28 20:06:41 +08:00
openeuler-basic
a76b2159f0 obsoletes acl-devel 2020-02-28 19:51:21 +08:00
openeuler-ci-bot
55abc646f2 !2 acl
Merge pull request !2 from syyhao/dev212
2020-02-15 15:26:00 +08:00
3 changed files with 61 additions and 1 deletions

View File

@ -1,13 +1,16 @@
Name: acl
Version: 2.2.53
Release: 6
Release: 10
Summary: Commands for manipulating POSIX access control lists
License: GPLv2+
URL: https://savannah.nongnu.org/projects/acl
Source0: http://download.savannah.nongnu.org/releases/acl/acl-2.2.53.tar.gz
Patch1: backport-acl_copy_entry-Prevent-accidental-NULL-pointer-deref.patch
BuildRequires: libattr-devel gawk libtool gettext
BuildRequires: chrpath
%description
This package contains commands for manipulating POSIX access control lists,
@ -26,6 +29,7 @@ This package contains the library for manipulating access control list.
Summary: Files necessary to develop applications with libacl
License: LGPLv2+
Requires: libacl = %{version}-%{release}, libattr-devel
Obsoletes: acl-devel < %{version}-%{release}
%description -n libacl-devel
This package contains header files for the POSIX ACL library.
@ -43,6 +47,11 @@ This package contains header files for the POSIX ACL library.
%make_install
%delete_la_and_a
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}*
chrpath -d $RPM_BUILD_ROOT%{_bindir}/setfacl
chrpath -d $RPM_BUILD_ROOT%{_bindir}/getfacl
chrpath -d $RPM_BUILD_ROOT%{_bindir}/chacl
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
echo "/usr/lib64/acl" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%find_lang %{name}
@ -70,6 +79,7 @@ make check
%files -n libacl
%{_libdir}/libacl.so.*
%{_sysconfdir}/ld.so.conf.d/*
%files -n libacl-devel
%defattr(-,root,root)
@ -85,6 +95,18 @@ make check
%{_mandir}/man5/*
%changelog
* Wed Jul 10 2024 yixiangzhike <yixiangzhike007@163.com> - 2.2.53-10
- backport upstream patch to avoid NULL dereferences
* Wed Aug 31 2022 zhangruifang <zhangruifang1@h-partners.com> - 2.2.53-9
- remove rpath and runpath of exec files and libraries
* Tue Aug 18 2020 chenyaqiang <chenyaqiang@huawei.com> - 2.2.53-8
- rebuild for package build
* Fri Feb 28 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.2.53-7
- Obsoletes acl-devel
* Wed Feb 12 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.2.53-6
- Change acl-devel to libacl-devel

4
acl.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: git
src_repo: git://git.savannah.gnu.org/acl.git
tag_prefix: ^v
seperator: .

View File

@ -0,0 +1,34 @@
From 4b7672d6fbfb9ef8a0b81f285b74aa299185aa83 Mon Sep 17 00:00:00 2001
From: Andreas Gruenbacher <agruenba@redhat.com>
Date: Mon, 24 Jun 2024 12:41:04 +0200
Subject: [PATCH] acl_copy_entry: Prevent accidental NULL pointer dereference
In acl_copy_entry(), when dest_d turns out to be invalid, dest_p will be
NULL. Instead of checking for that, we are accidentally checking if
dest_d is NULL. As a result, when called with an invalid dest_d object,
acl_copy_entry() will cause a NULL pointer dereference instead of
indicating an error. This is a relatively minor problem, but worth
fixing nonetheless.
Reported-by: His Shadow <shadowpilot34@gmail.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
libacl/acl_copy_entry.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libacl/acl_copy_entry.c b/libacl/acl_copy_entry.c
index f9c90c7..e92580c 100644
--- a/libacl/acl_copy_entry.c
+++ b/libacl/acl_copy_entry.c
@@ -28,7 +28,7 @@ acl_copy_entry(acl_entry_t dest_d, acl_entry_t src_d)
{
acl_entry_obj *dest_p = ext2int(acl_entry, dest_d),
*src_p = ext2int(acl_entry, src_d);
- if (!dest_d || !src_p)
+ if (!dest_p || !src_p)
return -1;
dest_p->etag = src_p->etag;
--
2.33.0