11 Star 0 Fork 25

src-openEuler/busybox
关闭

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-CVE-2023-42366.patch 1.02 KB
一键复制 编辑 原始数据 按行查看 历史
liuxu 提交于 2024-11-15 15:15 +08:00 . fix CVE-2023-42364 CVE-2023-42365 CVE-2023-42366
From c55dcbb77bb0bd7e61ce5c7a074013be06b32629 Mon Sep 17 00:00:00 2001
From: Valery Ushakov <uwe@stderr.spb.ru>
Date: Wed, 24 Jan 2024 22:24:41 +0300
Subject: [PATCH] awk.c: fix CVE-2023-42366 (bug #15874)
Make sure we don't read past the end of the string in next_token()
when backslash is the last character in an (invalid) regexp.
Conflict:No
Reference:https://git.alpinelinux.org/aports/plain/main/busybox/0026-awk.c-fix-CVE-2023-42366-bug-15874.patch
https://bugs.busybox.net/show_bug.cgi?id=15874
---
editors/awk.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/editors/awk.c b/editors/awk.c
index 64e752f4b..222e6298d 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -1234,9 +1234,11 @@ static uint32_t next_token(uint32_t expected)
s[-1] = bb_process_escape_sequence((const char **)&pp);
if (*p == '\\')
*s++ = '\\';
- if (pp == p)
+ if (pp == p) {
+ if (*p == '\0')
+ syntax_error(EMSG_UNEXP_EOS);
*s++ = *p++;
- else
+ } else
p = pp;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/busybox.git
git@gitee.com:src-openeuler/busybox.git
src-openeuler
busybox
busybox
master

搜索帮助