From d7e702dd5529860e3d97a84e387bad95573f5894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=81LI=20G=C3=A1bor=20J=C3=A1nos?= Date: Sat, 16 Mar 2024 13:33:00 +0100 Subject: Update to Linux 6.6 & 6.8, and Alpine 3.19 - Update dhcpcd to 10.0.5 - Update iptables to 1.8.10 - Update linux-lts to 6.6.22 - Update linux-edge to 6.8.1 - Update openrc 0.52.1 - Update mDNSResponder to 2200.80.16 - Update rtl8821ce to snapshot of 20240120 - Update rtw88 to snapshot of 20231024 - Resolve driver conflict between rtw88 and rtl8821ce - Update rtw89 to snapshot of 20240310 - Update socat to 1.8.0.0 - Import security fixes for wpa_supplicant --- .../0031-ash-initialize-basepf.buf-in-ash.patch | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 aports/busybox/0031-ash-initialize-basepf.buf-in-ash.patch (limited to 'aports/busybox/0031-ash-initialize-basepf.buf-in-ash.patch') diff --git a/aports/busybox/0031-ash-initialize-basepf.buf-in-ash.patch b/aports/busybox/0031-ash-initialize-basepf.buf-in-ash.patch new file mode 100644 index 0000000..51e5301 --- /dev/null +++ b/aports/busybox/0031-ash-initialize-basepf.buf-in-ash.patch @@ -0,0 +1,58 @@ +From ed4a24dfd10539e144ed4b7de008f8791d09a551 Mon Sep 17 00:00:00 2001 +From: zhuyan +Date: Tue, 29 Aug 2023 20:50:32 +0800 +Subject: [PATCH] ash: initialize basepf.buf in ash +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When I planned to print the command in read_line_input, I found that after +the system started, the command printed for the first time was always +garbled. + +After analysis, it is found that in the init() function of ash, the +variable basepf.buf is not initialized after applying for memory, resulting +in garbled initial data. Then assign it to the global variable +g_parsefile->buf in ash.c, and then pass g_parsefile->buf to the parameter +command of the function read_line_input in the function preadfd(), and +finally cause it to be garbled when the command is printed by +read_line_input. + +The call stack is as follows: + #0 read_line_input (st=0xb6fff220, prompt=0xb6ffc910 "\\[\\033[32m\\]\\h \\w\\[\\033[m\\] \\$ ", command=command@entry=0xb6ffc230 "P\325\377\266P\325\377\266", maxsize=maxsize@entry=1024) at libbb/lineedit.c:2461 + #1 0x0043ef8c in preadfd () at shell/ash.c:10812 + #2 preadbuffer () at shell/ash.c:10914 + #3 pgetc () at shell/ash.c:10997 + #4 0x00440c20 in pgetc_eatbnl () at shell/ash.c:11039 + #5 0x00440cbc in xxreadtoken () at shell/ash.c:13157 + #6 0x00440f40 in readtoken () at shell/ash.c:13268 + #7 0x00441234 in list (nlflag=nlflag@entry=1) at shell/ash.c:11782 + #8 0x004420e8 in parsecmd (interact=) at shell/ash.c:13344 + #9 0x00442c34 in cmdloop (top=top@entry=1) at shell/ash.c:13549 + #10 0x00444e4c in ash_main (argc=, argv=0x444e4c ) at shell/ash.c:14747 + #11 0x00407954 in run_applet_no_and_exit (applet_no=9, name=, argv=0xbefffd34) at libbb/appletlib.c:1024 + #12 0x00407b68 in run_applet_and_exit (name=0xbefffe56 "ash", argv=0x9) at libbb/appletlib.c:1047 + #13 0x00407f88 in main (argc=, argv=0xbefffd34) at libbb/appletlib.c:1181 + +Fixes: 82dd14a510ca ("ash: use CONFIG_FEATURE_EDITING_MAX_LEN") + +Signed-off-by: zhuyan +Signed-off-by: Denys Vlasenko +Signed-off-by: Sören Tempel +--- + shell/ash.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/shell/ash.c b/shell/ash.c +index e1d93da73..771fc8bf9 100644 +--- a/shell/ash.c ++++ b/shell/ash.c +@@ -14484,7 +14484,7 @@ static NOINLINE void + init(void) + { + /* we will never free this */ +- basepf.next_to_pgetc = basepf.buf = ckmalloc(IBUFSIZ); ++ basepf.next_to_pgetc = basepf.buf = ckzalloc(IBUFSIZ); + basepf.linno = 1; + + sigmode[SIGCHLD - 1] = S_DFL; /* ensure we install handler even if it is SIG_IGNed */ -- cgit v1.2.3