<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/scripts, branch cng_backend</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=cng_backend</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=cng_backend'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2025-06-09T12:23:49+00:00</updated>
<entry>
<title>Use Windows library for cryptographic checksums</title>
<updated>2025-06-09T12:23:49+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2025-06-09T12:23:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=596c443112d09506c3bf13ac98046a84b912e56c'/>
<id>urn:sha1:596c443112d09506c3bf13ac98046a84b912e56c</id>
<content type='text'>
Add a new feature to libbb, FEATURE_USE_CNG_API, which enables the
use of the Cryptography API: Next Generation library to calculate
checksums.  It is disabled by default except in the mingw64u default
config, as the API requires Windows 10+ to function.  Usage of this
API provides a size benefit and delegates hardware optimizations to
the operating system cryptography library.

Based on GitHub PR #498 by rfl890.

Saves 4064 bytes in the mingw64u case.
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2025-05-19T07:34:32+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2025-05-19T07:34:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=64bf69893bd99c305d13a956389f216e7d15c682'/>
<id>urn:sha1:64bf69893bd99c305d13a956389f216e7d15c682</id>
<content type='text'>
</content>
</entry>
<entry>
<title>archival: disallow path traversals (CVE-2023-39810)</title>
<updated>2025-04-16T01:03:17+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2024-10-02T08:12:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=9a8796436b9b0641e13480811902ea2ac57881d3'/>
<id>urn:sha1:9a8796436b9b0641e13480811902ea2ac57881d3</id>
<content type='text'>
Create new configure option for archival/libarchive based extractions to
disallow path traversals.
As this is a paranoid option and might introduce backward
incompatibility, default it to no.

Fixes: CVE-2023-39810

Based on the patch by Peter Kaestle &lt;peter.kaestle@nokia.com&gt;

function                                             old     new   delta
data_extract_all                                     921     945     +24
strip_unsafe_prefix                                  101     102      +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 25/0)               Total: 25 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>Update PDCurses</title>
<updated>2025-04-10T18:41:43+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2025-04-10T18:41:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=486c1fcc341472fd8d64b820c3a7934cf3f42132'/>
<id>urn:sha1:486c1fcc341472fd8d64b820c3a7934cf3f42132</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2024-09-28T07:13:32+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2024-09-28T07:13:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=431e2704c17d5c0e51a0cbebfb1105bd4962b3f7'/>
<id>urn:sha1:431e2704c17d5c0e51a0cbebfb1105bd4962b3f7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fixdep: add fstat error handling</title>
<updated>2024-09-27T18:03:30+00:00</updated>
<author>
<name>Sam James</name>
<email>sam@gentoo.org</email>
</author>
<published>2024-04-23T20:10:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=480a07bd6828285628abbbe3fe8e5e3b25ce1a92'/>
<id>urn:sha1:480a07bd6828285628abbbe3fe8e5e3b25ce1a92</id>
<content type='text'>
When `fstat` fails, `st` is left uninitialised. In our case, Ben Kohler
noticed our release media builds were failing in Gentoo on x86 when building
busybox with occasional SIGBUS. This turned out to be EOVERFLOW (from 32-bit
ino_t) which wasn't being reported because nothing was checking the return value
from `fstat`.

Fix that to avoid UB (use of uninit var) and to give a more friendly
error to the user.

This actually turns out to be fixed already in the kernel from back in
2010 [0] and 2016 [1].

[0] https://github.com/torvalds/linux/commit/a3ba81131aca243bfecfa78c42edec0cd69f72d6
[1] https://github.com/torvalds/linux/commit/46fe94ad18aa7ce6b3dad8c035fb538942020f2b

Reported-by: Ben Kohler &lt;bkohler@gentoo.org&gt;
Signed-off-by: Sam James &lt;sam@gentoo.org&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2024-06-23T08:44:03+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2024-06-23T08:35:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=b07c177b446498ccd739b367f9e80337c3dfa55a'/>
<id>urn:sha1:b07c177b446498ccd739b367f9e80337c3dfa55a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>build system: fix ncurses detection</title>
<updated>2024-04-28T14:48:03+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2024-04-28T14:48:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=e21f531c297d1567720c8b0f1c9bab7daf0cfdad'/>
<id>urn:sha1:e21f531c297d1567720c8b0f1c9bab7daf0cfdad</id>
<content type='text'>
Recent versions of gcc fail to build the binary to test for
ncurses because main() is lacking a return type.
</content>
</entry>
<entry>
<title>docproc: avoid segfault during file closing</title>
<updated>2024-04-13T15:57:46+00:00</updated>
<author>
<name>Yan Zhu</name>
<email>zhuyan2015@foxmail.com</email>
</author>
<published>2023-09-11T16:03:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=681e4f5d922b9f0ea968238750d5c5d748eac809'/>
<id>urn:sha1:681e4f5d922b9f0ea968238750d5c5d748eac809</id>
<content type='text'>
In the function find_export_symbols, since the fopen file does not
exit when it fails, there is a dereference problem in fclose(fp),
which will cause a segmentation fault.

Signed-off-by: Yan Zhu &lt;zhuyan2015@foxmail.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>win32: unicode: use newer wcwidth by default</title>
<updated>2024-03-29T14:26:13+00:00</updated>
<author>
<name>Avi Halachmi (:avih)</name>
<email>avihpit@yahoo.com</email>
</author>
<published>2023-07-24T08:01:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=c188a345a4d8fe453c4a06796e38d036106fc161'/>
<id>urn:sha1:c188a345a4d8fe453c4a06796e38d036106fc161</id>
<content type='text'>
This commit adds a new wcwidth implementation at libbb/wcwidth_alt.c,
and uses it instead of the existing implementation when compiling for
windows and CONFIG_LAST_SUPPORTED_WCHAR &gt;= 0x30000 - which is the case
with the unicode configs/mingw64u_defconfig.

The windows-target condition keeps non-windows build unmodified, and
the last supported wchar threshold is a semi-hack to allow switching
between implementations without adding a new config option (the old
code supports codepoints up to 0x2ffff).

The new file wcwidth_alt.c was generated by a new scripts/mkwcwidth,
which prints a wcwidth implementation using latest unicode data from
a local clone of https://github.com/jquast/wcwidth . This repo is the
main python wcwidth implementation, and is maintained and up to date.

Functional differences from the existing implementation:

- Unicode 15.1.0 (latest) with the new version (about 450 ranges of
  wide and zero-width codepoints), compared to roughly Unicode 5.0
  of the existing code (nearly 20 years old spec, about 150 ranges).
  The new spec includes, among others, various wide icons and emojis,
  which can now be edited correctly at the shell prompt, have correct
  alignment in 'ls', etc.

- The old implementation returns -1 (non-printable) for surrogates,
  while the new code returns 1, though this is inconsequential, and
  POSIX doesn't care. Also libc implementations vary in this regard.

Technical differences:

- The old version compiles less code/data when the last supported
  wchar is smaller, while the new version doesn't. This doesn't
  matter because the new version is enabled only for the full range.

- The new version is smaller and relatively straight forward, and
  fully automated (generated), so updates to newer spec is trivial.
  The old version mixes data, ad-hoc code (tailored to the data),
  and preprocessor checks, and is hard to automate updates.

  The old version has various forms of 32 and 16 bit data ranges, in
  several arrays, while the new version uses single data array with
  unified form of 32 bits per range, with two rules:
  - A data range can't span Unicode planes (enforced, but unlikely
    required, and if yes, code to split ranges would be simple).
  - A range can't hold more than 32768 codepoints, so bigger ranges
    are split automatically (currently there are 2 such ranges).

Performance wise, the new version should be faster, even with three
times the data ranges. Both versions do effectively at most one binary
search in one Unicode plane data, but the new version finds both
zero-width and wide-width results in this one search, while the old
version only finds zero-width, and to detect wide-width it does an
additional linear series of manual range tests, but since most results
are width 1, this sequence is performed in most (non-ASCII) calls.

In a cursory comparison of the new wcwidth with glibc and musl-libc
(both use O(1) lookup tables), with few bodies of text, we're in the
same ballpark, with typical speed of 60% or better.

Bloat-wise, the new version is about 180 bytes code and 1800 bytes
data. If it had similar number of data ranges as the old code (150),
the new version would be about 200 bytes smaller, but because the
new version has 450 data ranges, it's about 1K bigger.
</content>
</entry>
</feed>
