From 6467c47cbe562e99e970dbb895e1068f54e6295b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 14 Jun 2024 13:40:35 +0200 Subject: [PATCH] TMP-REPRODUCE: vfs_recycle: demonstrate memory corruption in recycle_unlink_internal() Forcing a reload of the smb.conf option values means the pointer learned in vfs_recycle_connect() become stale. This will be reverted at the end of the patset again. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15659 Signed-off-by: Stefan Metzmacher Reviewed-by: Martin Schwenke Reviewed-by: Noel Power Reviewed-by: Volker Lendecke --- selftest/knownfail.d/samba3.blackbox.recycle | 2 ++ source3/modules/vfs_recycle.c | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 selftest/knownfail.d/samba3.blackbox.recycle diff --git a/selftest/knownfail.d/samba3.blackbox.recycle b/selftest/knownfail.d/samba3.blackbox.recycle new file mode 100644 index 00000000000..bae7f717e09 --- /dev/null +++ b/selftest/knownfail.d/samba3.blackbox.recycle @@ -0,0 +1,2 @@ +^samba3.blackbox.recycle.recycle.fileserver +^samba3.blackbox.recycle.check_panic.fileserver diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c index 327a7eea06e..43e229692d1 100644 --- a/source3/modules/vfs_recycle.c +++ b/source3/modules/vfs_recycle.c @@ -437,6 +437,8 @@ static int recycle_unlink_internal(vfs_handle_struct *handle, int rc = -1; struct recycle_config_data *config; + reload_services(NULL, NULL, false); + SMB_VFS_HANDLE_GET_DATA(handle, config, struct recycle_config_data, -- 2.47.3