Debian Codegraph @

debian/patches/CVE-2026-8276.patch

raw symbols SCIP
1 Descriptionscip-debian debian bettercap 2.33.0-4 bettercap/patches/`CVE-2026-8276.patch`#Description.: Fix mysql.server panic on crafted client handshake (remote DoS).
2 Authorscip-debian debian bettercap 2.33.0-4 bettercap/patches/`CVE-2026-8276.patch`#Author.: Simone Margaritelli <[email protected]scip-debian . . . identity/`[email protected]`.>
3 Originscip-debian debian bettercap 2.33.0-4 bettercap/patches/`CVE-2026-8276.patch`#Origin.: upstream, https://github.com/bettercap/bettercap/commit/0eaa375c5e5446bfba94a290eff92967a5deac9e.patch
4 Bugscip-debian debian bettercap 2.33.0-4 bettercap/patches/`CVE-2026-8276.patch`#Bug.: https://github.com/bettercap/bettercap/issues/1265
5 Bug-Debianscip-debian debian bettercap 2.33.0-4 bettercap/patches/`CVE-2026-8276.patch`#Bug-Debian.: https://bugs.debian.org/1136448scip-debian-bts debian-bts . . 1136448:
6 Forwardedscip-debian debian bettercap 2.33.0-4 bettercap/patches/`CVE-2026-8276.patch`#Forwarded.: not-needed
7 Reviewed-Byscip-debian debian bettercap 2.33.0-4 bettercap/patches/`CVE-2026-8276.patch`#Reviewed-By.: Francisco Vilmar Cardoso Ruviaro <[email protected]>
8 Last-Updatescip-debian debian bettercap 2.33.0-4 bettercap/patches/`CVE-2026-8276.patch`#Last-Update.: 2026-07-10
9
10 --- a/modules/mysql_server/mysql_server.goscip-debian debian bettercap 2.33.0-4 bettercap/upstream/`modules/mysql_server/mysql_server.go`:
11 +++ b/modules/mysql_server/mysql_server.goscip-debian debian bettercap 2.33.0-4 bettercap/upstream/`modules/mysql_server/mysql_server.go`:
12 @@ -121,15 +121,20 @@ func (mod *MySQLServer) Start() error {
13 if _, err := conn.Write(packets.MySQLGreeting); err != nil {
14 mod.Warning("error while writing server greeting: %s", err)
15 continue
16 - } else if _, err = reader.Read(readBuffer); err != nil {
17 + } else if read, err = reader.Read(readBuffer); err != nil {
18 mod.Warning("error while reading client message: %s", err)
19 continue
20 }
21
22 + if read < 37 {
23 + mod.Warning("client handshake too short (%d bytes)", read)
24 + continue
25 + }
26 +
27 // parse client capabilities and validate connection
28 // TODO: parse mysql connections properly and
29 // display additional connection attributes
30 - capabilities := fmt.Sprintf("%08b", (int(uint32(readBuffer[4]) | uint32(readBuffer[5])<<8)))
31 + capabilities := fmt.Sprintf("%016b", (int(uint32(readBuffer[4]) | uint32(readBuffer[5])<<8)))
32 loadData := string(capabilities[8])
33 username := string(bytes.Split(readBuffer[36:], []byte{0})[0])
34