mirror of
https://git.yoctoproject.org/poky
synced 2026-09-15 06:49:33 +02:00
ruby: backport fix for CVE-2024-27282
Upstream-Status: Backport [989a235580]
(From OE-Core rev: 94a0350058e51c4b05bf5d4e02d048c2e6256725)
Signed-off-by: Ashish Sharma <asharma@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
committed by
Steve Sakoman
parent
4bad38de6e
commit
6d58d0c4a2
29
meta/recipes-devtools/ruby/ruby/CVE-2024-27282.patch
Normal file
29
meta/recipes-devtools/ruby/ruby/CVE-2024-27282.patch
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
From 989a2355808a63fc45367785c82ffd46d18c900a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Hiroshi SHIBATA <hsbt@ruby-lang.org>
|
||||||
|
Date: Fri, 12 Apr 2024 15:01:47 +1000
|
||||||
|
Subject: [PATCH] Fix Use-After-Free issue for Regexp
|
||||||
|
|
||||||
|
Co-authored-by: Isaac Peka <7493006+isaac-peka@users.noreply.github.com>
|
||||||
|
|
||||||
|
Upstream-Status: Backport [https://github.com/ruby/ruby/commit/989a2355808a63fc45367785c82ffd46d18c900a]
|
||||||
|
CVE: CVE-2024-27282
|
||||||
|
Signed-off-by: Ashish Sharma <asharma@mvista.com>
|
||||||
|
|
||||||
|
|
||||||
|
regexec.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/regexec.c b/regexec.c
|
||||||
|
index 73694ab14a0b0a..140691ad42489f 100644
|
||||||
|
--- a/regexec.c
|
||||||
|
+++ b/regexec.c
|
||||||
|
@@ -3449,8 +3449,8 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
|
||||||
|
CASE(OP_MEMORY_END_PUSH_REC) MOP_IN(OP_MEMORY_END_PUSH_REC);
|
||||||
|
GET_MEMNUM_INC(mem, p);
|
||||||
|
STACK_GET_MEM_START(mem, stkp); /* should be before push mem-end. */
|
||||||
|
- STACK_PUSH_MEM_END(mem, s);
|
||||||
|
mem_start_stk[mem] = GET_STACK_INDEX(stkp);
|
||||||
|
+ STACK_PUSH_MEM_END(mem, s);
|
||||||
|
MOP_OUT;
|
||||||
|
JUMP;
|
||||||
|
|
||||||
@@ -35,6 +35,7 @@ SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \
|
|||||||
file://CVE-2023-36617_2.patch \
|
file://CVE-2023-36617_2.patch \
|
||||||
file://CVE-2024-27281.patch \
|
file://CVE-2024-27281.patch \
|
||||||
file://CVE-2024-27280.patch \
|
file://CVE-2024-27280.patch \
|
||||||
|
file://CVE-2024-27282.patch \
|
||||||
"
|
"
|
||||||
UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/"
|
UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user