Thread View: linux.debian.bugs.dist
2 messages
2 total messages
Started by Yuanfu Xie
Wed, 21 Oct 2026 19:50
Bug#1151580: libsmb2: please consider backporting three upstream memory-safety fixes
Author: Yuanfu Xie
Date: Wed, 21 Oct 2026 19:50
Date: Wed, 21 Oct 2026 19:50
54 lines
4457 bytes
4457 bytes
Package: libsmb2
Version: 6.2+dfsg-2+deb13u1
Severity: important
Tags: security
Hello,
I have been testing the libsmb2 client in 6.2 against servers that
return malformed SMB2 replies. Four client-side memory-safety bugs are
reachable that way; all four are already fixed upstream on master, but
none of the fixes is in a release tag. The 6.2 package in Debian 13
(6.2+dfsg-2+deb13u1), in forky/sid (6.2+dfsg-4), and in Ubuntu 25.10
and newer (6.2+dfsg-3) is still affected. (Debian 12 and Ubuntu 24.04
LTS do not ship libsmb2.)
The upstream fixes:
09424fa Do not queue a zero length pad vector, and bound the iovec
skip loop
-> stack-buffer-overflow in smb2_read_data(), lib/socket.c:355
bae5ef5 Validate untrusted lengths and offsets throughout the PDU
decoders
-> double free in the query-directory reply decoder error
path; the same hardening also removes a NULL
dereference in getinfo_cb_2() (lib/libsmb2.c:1960) when
a QUERY_INFO reply has Status=SUCCESS and
OutputBufferLength=0
57bee9f Fix heap out-of-bounds read in smb2_decode_file_all_info()
-> server-controlled FileNameLength read past the receive
buffer, lib/unicode.c:210 (8-line change)
All four are triggered by a malicious or compromised SMB2 server; none
requires credentials beyond a normal mount.
Evidence: with an ASan/UBSan build of 6.2 I get deterministic reports
for each of them, and for the getinfo_cb_2 issue I also linked against
the static library shipped in libsmb2-dev 6.2+dfsg-3 - the crash still
reproduces with the packaged library, so this is not an artefact of a
local build. Reproducers and sanitizer traces available on request.
Would you consider backporting these three commits to the Debian
package? bae5ef5 is a larger decoder-hardening change and may need
adaptation; 57bee9f is tiny and 09424fa is confined to lib/socket.c.
The package already carries upstream patch series, so this would fit
the existing pattern. I am happy to help test a backported package.
(I have also written to the upstream maintainer about a possible
release, since a new tag would help all downstreams.)
Thanks,
Yuanfu Xie
yuanfuxie@stu.pku.edu.cn
Bug#1151580: libsmb2: please consider backporting three upstream memory-safety fixes
Author: Matheus Polkorny
Date: Fri, 13 Nov 2026 18:10
Date: Fri, 13 Nov 2026 18:10
48 lines
3441 bytes
3441 bytes
--ky3uegr65eac2ycp Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: libsmb2: please consider backporting three upstream memory-safety fixes MIME-Version: 1.0 Hello, Yuanfu Xie, As you probably know, the fixes have been backported to 6.3 by upstream: - 09424fa =E2=80=94 https://github.com/sahlberg/libsmb2/commit/e2ac2ac797be= 208c430019aae82fd8be2b3ed057 - bae5ef5 =E2=80=94 https://github.com/sahlberg/libsmb2/commit/48f5b87b4bb3= ca4c390834f66905898544083ddc - 57bee9f =E2=80=94 https://github.com/sahlberg/libsmb2/commit/588a77951e5b= 15016f54a7e5eacb5d695ef86106 I intend to upload the 6.3.2 tag soon. Thank you for your help! --=20 Thanks, Polkorny --ky3uegr65eac2ycp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEcRD/fHLtdypUR2KKShyoWjj77loFAmr3UCMACgkQShyoWjj7 7lqZIRAAuu5Vehfg2NFYtjeAo7/Trcm6bHtAp4BFC/0hP8J39whKb09AAT6rFtCF Uibo3n/XC8SyUTPVWUJdhA0LW1QgDuxHdt9WrIjcxCYsHz3gjq0/W3GO1ueOJ1DD 2y+qM323ep98ZsWI6R7opuCBvNIAI2o/CsSpdVbtxz9YGWvsVPjtoiyo7GeAUB0B VOIM72WK08l/PpDGItDKWe65hj4HuZoybv7EjXMDsT1Mu+H/4dSiGui5S31/5e11 G99Dw+lr1hF4Krnabavz4uH/GlLbCLFzmR5813dbgq1VS9RLTGHDaqgFl98huFdc 53Fwcxrsx7b/Yj71fQLUCuw27KKEvrXabLQFLLKopj5mToC5rDaS8lw7hrOt+m9O ZpVj4123GUHYw520tavE7jPRHyjuSyvQ5Mba6Dw7Yg4/ZLgNjAGhLgwARO1HgYVE wNwuklw3GUesZi1O+L7vSXAWqcBhKN8BVsZdVKwKq5d1bOR4Sdq/DjNsy92hErw2 7Og4Ys6Pvpd8j+79UfG93WQugl0BQXWi/xuFxRWfGTUVzWpq94GdA2Ff5FvP/I3i u3elrpE+e6XIxTahaphFZ6xhr/4ORqkliCd3TVCUJiD7ihcSYdwK+mLjnT8ZdZPL avDZUD0ynbktBYvW6FGTlH3/w55/iow2kF33tFlOV7Ll6eaTz+U= =IFqd -----END PGP SIGNATURE----- --ky3uegr65eac2ycp--
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads