From: Catalin Marinas <catalin.marinas@arm.com>
To: Will Deacon <will@kernel.org>, Seth Jenkins <sethjenkins@google.com>
Cc: Eric Biederman <ebiederm@xmission.com>,
Kees Cook <keescook@chromium.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org
Subject: [PATCH 1/3] arm64: mte: Fix double-freeing of the temporary tag storage during coredump
Date: Thu, 22 Dec 2022 18:12:49 +0000 [thread overview]
Message-ID: <20221222181251.1345752-2-catalin.marinas@arm.com> (raw)
In-Reply-To: <20221222181251.1345752-1-catalin.marinas@arm.com>
Commit 16decce22efa ("arm64: mte: Fix the stack frame size warning in
mte_dump_tag_range()") moved the temporary tag storage array from the
stack to slab but it also introduced an error in double freeing this
object. Remove the in-loop freeing.
Fixes: 16decce22efa ("arm64: mte: Fix the stack frame size warning in mte_dump_tag_range()")
Cc: <stable@vger.kernel.org> # 5.18.x
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Seth Jenkins <sethjenkins@google.com>
Cc: Will Deacon <will@kernel.org>
---
arch/arm64/kernel/elfcore.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm64/kernel/elfcore.c b/arch/arm64/kernel/elfcore.c
index 27ef7ad3ffd2..4e3f84799669 100644
--- a/arch/arm64/kernel/elfcore.c
+++ b/arch/arm64/kernel/elfcore.c
@@ -65,7 +65,6 @@ static int mte_dump_tag_range(struct coredump_params *cprm,
mte_save_page_tags(page_address(page), tags);
put_page(page);
if (!dump_emit(cprm, tags, MTE_PAGE_TAG_STORAGE)) {
- mte_free_tag_storage(tags);
ret = 0;
break;
}
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Catalin Marinas <catalin.marinas@arm.com>
To: Will Deacon <will@kernel.org>, Seth Jenkins <sethjenkins@google.com>
Cc: Eric Biederman <ebiederm@xmission.com>,
Kees Cook <keescook@chromium.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org
Subject: [PATCH 1/3] arm64: mte: Fix double-freeing of the temporary tag storage during coredump
Date: Thu, 22 Dec 2022 18:12:49 +0000 [thread overview]
Message-ID: <20221222181251.1345752-2-catalin.marinas@arm.com> (raw)
In-Reply-To: <20221222181251.1345752-1-catalin.marinas@arm.com>
Commit 16decce22efa ("arm64: mte: Fix the stack frame size warning in
mte_dump_tag_range()") moved the temporary tag storage array from the
stack to slab but it also introduced an error in double freeing this
object. Remove the in-loop freeing.
Fixes: 16decce22efa ("arm64: mte: Fix the stack frame size warning in mte_dump_tag_range()")
Cc: <stable@vger.kernel.org> # 5.18.x
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Seth Jenkins <sethjenkins@google.com>
Cc: Will Deacon <will@kernel.org>
---
arch/arm64/kernel/elfcore.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm64/kernel/elfcore.c b/arch/arm64/kernel/elfcore.c
index 27ef7ad3ffd2..4e3f84799669 100644
--- a/arch/arm64/kernel/elfcore.c
+++ b/arch/arm64/kernel/elfcore.c
@@ -65,7 +65,6 @@ static int mte_dump_tag_range(struct coredump_params *cprm,
mte_save_page_tags(page_address(page), tags);
put_page(page);
if (!dump_emit(cprm, tags, MTE_PAGE_TAG_STORAGE)) {
- mte_free_tag_storage(tags);
ret = 0;
break;
}
next prev parent reply other threads:[~2022-12-22 18:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-22 18:12 [PATCH 0/3] arm64: mte: Coredump fixes Catalin Marinas
2022-12-22 18:12 ` Catalin Marinas
2022-12-22 18:12 ` Catalin Marinas [this message]
2022-12-22 18:12 ` [PATCH 1/3] arm64: mte: Fix double-freeing of the temporary tag storage during coredump Catalin Marinas
2022-12-22 18:12 ` [PATCH 2/3] elfcore: Add a cprm parameter to elf_core_extra_{phdrs,data_size} Catalin Marinas
2022-12-22 18:12 ` Catalin Marinas
2023-01-24 21:36 ` Kees Cook
2023-01-24 21:36 ` Kees Cook
2022-12-22 18:12 ` [PATCH 3/3] arm64: mte: Avoid the racy walk of the vma list during core dump Catalin Marinas
2022-12-22 18:12 ` Catalin Marinas
2023-01-05 18:03 ` [PATCH 0/3] arm64: mte: Coredump fixes Will Deacon
2023-01-05 18:03 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221222181251.1345752-2-catalin.marinas@arm.com \
--to=catalin.marinas@arm.com \
--cc=ebiederm@xmission.com \
--cc=gregkh@linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=sethjenkins@google.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.