Bug#1141973: trixie-pu: package bettercap/2.33.0-1+deb13u1

Francisco Vilmar Cardoso Ruviaro <[email protected]>
Newsgroups gmane.linux.debian.devel.release
Message-ID <94e93c82-44bd-472b-882c-63fdbeb09009__40632.0059018739$1783913249$gmane$org@debian.org>
Package: release.debian.org
Severity: normal
Tags: trixie
User: [email protected]
Usertags: pu

Dear Release Team,

I would like to update the bettercap on the trixie to prevent remote DoS via
crafted client handshake on mysql.server module, because during a review of
the Debian Security Tracker, I found CVE-2026-8276.

There is no DSA assigned to the bug and it was marked "no-dsa" and so I'm doing
a normal upload.

"mysql.server crashes entire process on crafted client handshake (remote DoS)",
as reported in: https://github.com/bettercap/bettercap/issues/1265

This vulnerability has been assigned the CVE id CVE-2026-8276.

Upstream fixed the bug at:
https://github.com/bettercap/bettercap/commit/0eaa375c5e5446bfba94a290eff92967a5deac9e

[0] http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-8276
[1] https://security-tracker.debian.org/tracker/CVE-2026-8276
[2] https://bugs.debian.org/1136448

Regards,
Francisco

diff -Nru bettercap-2.33.0/debian/changelog bettercap-2.33.0/debian/changelog
--- bettercap-2.33.0/debian/changelog	2024-08-18 20:54:15.000000000 +0000
+++ bettercap-2.33.0/debian/changelog	2026-07-13 02:41:40.000000000 +0000
@@ -1,3 +1,10 @@
+bettercap (2.33.0-1+deb13u1) trixie; urgency=medium
+
+  * Add debian/patches/CVE-2026-8276.patch.
+    (Closes: #1136448, CVE-2026-8276)
+
+ -- Francisco Vilmar Cardoso Ruviaro <[email protected]>  Mon, 13 Jul 2026 02:41:40 +0000
+
 bettercap (2.33.0-1) unstable; urgency=medium
 
   * New upstream version 2.33.0.
diff -Nru bettercap-2.33.0/debian/patches/CVE-2026-8276.patch bettercap-2.33.0/debian/patches/CVE-2026-8276.patch
--- bettercap-2.33.0/debian/patches/CVE-2026-8276.patch	1970-01-01 00:00:00.000000000 +0000
+++ bettercap-2.33.0/debian/patches/CVE-2026-8276.patch	2026-07-13 02:34:14.000000000 +0000
@@ -0,0 +1,34 @@
+Description: Fix mysql.server panic on crafted client handshake (remote DoS).
+Author: Simone Margaritelli <[email protected]>
+Origin: upstream, https://github.com/bettercap/bettercap/commit/0eaa375c5e5446bfba94a290eff92967a5deac9e.patch
+Bug: https://github.com/bettercap/bettercap/issues/1265
+Bug-Debian: https://bugs.debian.org/1136448
+Forwarded: not-needed
+Reviewed-By: Francisco Vilmar Cardoso Ruviaro <[email protected]>
+Last-Update: 2026-07-10
+
+--- a/modules/mysql_server/mysql_server.go
++++ b/modules/mysql_server/mysql_server.go
+@@ -121,15 +121,20 @@ func (mod *MySQLServer) Start() error {
+ 				if _, err := conn.Write(packets.MySQLGreeting); err != nil {
+ 					mod.Warning("error while writing server greeting: %s", err)
+ 					continue
+-				} else if _, err = reader.Read(readBuffer); err != nil {
++				} else if read, err = reader.Read(readBuffer); err != nil {
+ 					mod.Warning("error while reading client message: %s", err)
+ 					continue
+ 				}
+ 
++				if read < 37 {
++					mod.Warning("client handshake too short (%d bytes)", read)
++					continue
++				}
++
+ 				// parse client capabilities and validate connection
+ 				// TODO: parse mysql connections properly and
+ 				//       display additional connection attributes
+-				capabilities := fmt.Sprintf("%08b", (int(uint32(readBuffer[4]) | uint32(readBuffer[5])<<8)))
++				capabilities := fmt.Sprintf("%016b", (int(uint32(readBuffer[4]) | uint32(readBuffer[5])<<8)))
+ 				loadData := string(capabilities[8])
+ 				username := string(bytes.Split(readBuffer[36:], []byte{0})[0])
+ 
diff -Nru bettercap-2.33.0/debian/patches/series bettercap-2.33.0/debian/patches/series
--- bettercap-2.33.0/debian/patches/series	2024-08-18 17:41:44.000000000 +0000
+++ bettercap-2.33.0/debian/patches/series	2026-07-13 02:34:56.000000000 +0000
@@ -1,3 +1,4 @@
 adapt-service-file.patch
 disable-install-update-bettercap.patch
 disable-install-update-caplets.patch
+CVE-2026-8276.patch

Regards,
-- 
Francisco Vilmar Cardoso Ruviaro <[email protected]>
4096R: 1B8C F656 EF3B 8447 2F48 F0E7 82FB F706 0B2F 7D00
OpenPGP_signature.asc (application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEEG4z2Vu87hEcvSPDngvv3BgsvfQAFAmpUWpQFAwAAAAAACgkQgvv3BgsvfQAn
OQ/9H6HSpyyiQGwtM/66PffiAXPfOSS32cATZ0VSLGGHRKodst0OgKVKERqV88Y48g73A2ywkmTS
7fjvtzpw7349xPFGBOR1Zd2U1p15meBgD7vsw7jYVrEKL3gfUluHqDZLSVJS138s74q8PtYzCQ4x
g6IaS33Ov64CEUp3nD3z3drrPE8F7qFOtnnqWsEhF3DdujH0sW7zLNt4x9mpZZi1napnHHRrk7SB
CPLQHaqldF89avew3mmBOsL5FAoWGnSbaHZ/ofnzjiF457rr1JoC7upOaKzLoCj4LpXvOE1dYIeo
2Exy/FNBL7SNRiWttSOj8vmqhmrtMfq/W4ctANClLJ55ezqaHdGnR8hGdh/Z9WvlzVPyT5VmqIz9
anZtcSdZiZwfNSX2MmCkAs2UBtFw3SAFCKJl78ZiP44jFvDGGKlKFx3e92R+/85i0qMhftKY4m1k
kY/qWitNsZFFosUdIZqbsQISGCMIRtzZq+mbZCMNQ/GSA0qazPTTYrP70vGAdfIJo4HVLWDcZ6Bj
5MUgz+VgTOpm0wPSBC4w+9ZCPx0Id7nzEBZm1AZ9MuTBOukb0iBu8WPX9WKF26eBM6g8OfaCDDQU
sHUrrz+yQ79UQ4mCWY+6DTETQxQ+DTGsGLG+8Alnz0ggNWzu1cUefUSuTckRXjmsoan5v/riyPCT
KvY=
=3XzU
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.