Projects
Mega:24.03
lvm2
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
_service:tar_scm:lvm2.spec
Changed
@@ -43,7 +43,7 @@ Name: lvm2 Version: 2.03.21 -Release: 6 +Release: 7 Epoch: 8 Summary: Tools for logical volume management License: GPLv2+ and LGPLv2.1 and BSD @@ -65,6 +65,7 @@ Patch14: 0014-use-sync-io-read-bcache-by-defaults.patch Patch15: 0015-vgchange-acquire-an-exclusive-VG-lock-for-refresh.patch Patch16: 0016-dm-event-release-buffer-on-dm_event_get_version.patch +Patch17: 0017-clean-up-group-struct-in-_stats_create_group-error-path.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -491,6 +492,9 @@ %changelog +* Thu Mar 21 2024 wangzhiqiang <wangzhiqiang95@huawei.com> - 8:2.03.21-7 +- backport upstream patch + * Wed Feb 28 2024 wangzhiqiang <wangzhiqiang95@huawei.com> - 8:2.03.21-6 - revert version to 2.03.21
View file
_service:tar_scm:0017-clean-up-group-struct-in-_stats_create_group-error-path.patch
Added
@@ -0,0 +1,43 @@ +From eda99fc3839dcd439270ba5977ca6628bd9752cc Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" <bmr@redhat.com> +Date: Thu, 31 Aug 2023 16:59:02 +0100 +Subject: PATCH Clean up group struct in _stats_create_group() error path + +Conflict: NA +Reference: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=eda99fc3839dcd439270ba5977ca6628bd9752cc + +Fix a double free in the error path from _stats_create_group() by +clearing the group struct embedded in the dm_stats handle before +returning: + + device-mapper: message ioctl on (253:0) failed: Invalid argument + Could not create regions from file /var/tmp/File With Spaces. + free(): double free detected in tcache 2 + Aborted (core dumped) +--- + libdm/libdm-stats.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c +index 62b28b69d..dc2907f4e 100644 +--- a/libdm/libdm-stats.c ++++ b/libdm/libdm-stats.c +@@ -3908,9 +3908,14 @@ static int _stats_create_group(struct dm_stats *dms, dm_bitset_t regions, + + /* force an update of the group tag stored in aux_data */ + if (!_stats_set_aux(dms, *group_id, dms->regions*group_id.aux_data)) +- return 0; ++ goto bad; + + return 1; ++bad: ++ group->group_id = DM_STATS_GROUP_NOT_PRESENT; ++ group->regions = NULL; ++ dm_free((char *) group->alias); ++ return 0; + } + + static int _stats_group_check_overlap(const struct dm_stats *dms, +-- +2.39.3 +
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2