1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

13735 Commits

Author SHA1 Message Date
Sébastien Helleu bd6455d07f Version 4.9.2 v4.9.2 2026-06-07 09:25:09 +02:00
Sébastien Helleu 8d3180fa78 tests: increase buffer size for injection of fake IRC message 2026-06-07 08:48:47 +02:00
aizu-m 519ab4e7bb relay: fix out-of-bounds read in relay_http_print_log_request (#2324) 2026-06-06 11:20:05 +02:00
Sébastien Helleu 3c36fd7412 relay: limit size of partial message received while reading an HTTP request to prevent memory exhaustion
A relay client could send data with no end-of-line (an unterminated method
or header line) and dribble its payload, making WeeChat accumulate it in the
partial message buffer that grew without limit, until all memory was
exhausted. This path is reachable before authentication during websocket
initialization with the "weechat" and "irc" protocols.

The accumulated partial message is now bounded by
RELAY_HTTP_PARTIAL_MESSAGE_MAX_LENGTH: once the limit is reached, the extra
data is ignored.
2026-06-06 09:38:55 +02:00
Sébastien Helleu b62c97dbe3 core: add links to issues in ChangeLog (#2321, #2322) 2026-06-06 07:25:19 +02:00
aizu-m f91f92b48f xfer: fix out-of-bounds read in xfer_chat_recv_cb on empty line (#2323) 2026-06-06 07:21:55 +02:00
aizu-m 30529057c8 irc: fix out-of-bounds read in DCC command with quoted filename 2026-06-04 23:20:59 +02:00
Sébastien Helleu a69f356182 tests: add tests on function xfer_file_find_filename 2026-06-04 23:20:26 +02:00
aizu-m 1438255a87 xfer: replace directory separator in remote nick by underscore in download filename 2026-06-04 23:20:08 +02:00
Sébastien Helleu d15ce789a0 api: fix infinite loop in function string_replace when the search string is empty 2026-06-03 21:17:32 +02:00
Sébastien Helleu 377b6da43d relay: limit size of received websocket frame and HTTP body to prevent memory exhaustion
A relay client could announce a huge websocket frame (or HTTP body via
"Content-Length") and dribble its payload, making WeeChat accumulate it
in a buffer that grew without limit, until all memory was exhausted. The
websocket frame path is reachable before authentication with the
"weechat" and "irc" protocols.

The announced websocket frame length and HTTP "Content-Length" are now
bounded by WEBSOCKET_FRAME_MAX_LENGTH and RELAY_HTTP_BODY_MAX_LENGTH: an
oversized websocket frame closes the connection, and an oversized body is
rejected.
2026-06-01 22:09:27 +02:00
Sébastien Helleu 8b1b06a407 irc: limit size of data received from the server to prevent memory exhaustion
A malicious or compromised IRC server could send data with no end-of-line
(or a flood of "005" messages), making WeeChat accumulate it in a buffer
that grew without limit, until all memory was exhausted.

The unterminated received message and the accumulated "005" (ISUPPORT)
data are now bounded by IRC_SERVER_RECV_MSG_MAX_LENGTH and
IRC_SERVER_ISUPPORT_MAX_LENGTH: extra data is ignored once the limit is
reached.
2026-06-01 22:08:39 +02:00
Sébastien Helleu c09c1bf2fc ci: enable ruby 3.3 module on Rocky Linux 9 2026-05-31 15:19:37 +02:00
Sébastien Helleu c83afb9a06 ci: install dnf-plugins-core on Rocky Linux 9 for dnf config-manager 2026-05-31 15:18:42 +02:00
Sébastien Helleu ed9535a43f Version 4.9.2-dev 2026-05-31 13:50:17 +02:00
Sébastien Helleu 2148829ebe Version 4.9.1 v4.9.1 2026-05-31 13:46:04 +02:00
Sébastien Helleu 1ca2a00255 core: fix timing attack on TOTP validation (GHSA-vhv8-g2r9-cwcc)
weecrypto_totp_validate compared the generated and client-supplied OTPs
with strcmp and broke out of the time-window loop on the first match.
Both choices leaked information via response timing: strcmp leaked the
expected OTP digit-by-digit (shrinking the brute-force search from
~10^digits to a handful of guesses within the 30-second window), and
the early break leaked which window offset matched.

Compare in constant time with string_memcmp_constant_time and always
iterate the full window, OR-ing the result into otp_ok without an
early exit.

This affects both relay protocols (which call totp_validate via the
public info hook) and any other caller of the info hook.
2026-05-31 09:14:24 +02:00
Sébastien Helleu c737373d17 relay/irc: fix timing attack on PASS command (GHSA-vhv8-g2r9-cwcc)
The IRC relay protocol's PASS handler compared the server password with
the client-supplied value using strcmp, leaking the password byte-by-byte
via response timing. This is the same class of bug fixed for the api and
weechat protocols, on a separate code path that did not go through
relay_auth_check_password_plain.

Extract the HMAC-then-constant-time-compare logic from
relay_auth_check_password_plain into relay_auth_password_equals, then
use it in both the plain-auth wrapper and the IRC PASS handler.
2026-05-31 09:12:09 +02:00
Sébastien Helleu 30230498b2 relay: fix timing attack on password authentication (GHSA-vhv8-g2r9-cwcc)
The relay authentication used non-constant-time comparisons (strcasecmp,
strcmp) to verify password hashes and plaintext passwords, allowing an
attacker to derive the expected hash byte-by-byte from response timing
and then authenticate without knowing the password.

- SHA/PBKDF2 hex hash comparisons: normalize the client-supplied hash to
  uppercase and compare in constant time over the fixed expected length.
- Plaintext password comparison: HMAC-SHA256 both passwords with a fresh
  per-call random key and compare the fixed-size MACs in constant time,
  hiding both per-byte timing and the password length.

Add string_memcmp_constant_time helper in core, exposed via the plugin
API. Bump WEECHAT_PLUGIN_API_VERSION accordingly.
2026-05-31 09:11:53 +02:00
Sébastien Helleu 35699ea802 relay: limit size of decompressed websocket frame to prevent memory exhaustion (GHSA-v2v4-45wm-5cr3)
An authenticated relay client using the permessage-deflate websocket
extension could send a small compressed frame that decompresses to an
unbounded amount of data, exhausting all memory and crashing WeeChat.

The output buffer in relay_websocket_inflate is now capped to
WEBSOCKET_INFLATE_MAX_SIZE: frames decompressing beyond this limit are
rejected and the connection is closed.
2026-05-31 09:07:23 +02:00
Sébastien Helleu 5e4c165dad ci: bump poexam to version 0.0.10 2026-05-31 08:32:59 +02:00
Sébastien Helleu 23fb6bfe88 core: fix option weechat.look.color_real_white not applied when color is "white" on 16+ colors terminals (issue #1742) 2026-05-23 13:41:40 +02:00
Sébastien Helleu ec03437f9e irc: fix tag in message with list of names when joining a channel
The message with list of nicks on the channel has now tag irc_353 instead of
irc_366.
2026-05-23 13:22:33 +02:00
Sébastien Helleu 564ad2d5cd core: set max curl version to 8.21.0 for symbol CURLAUTH_DIGEST_IE 2026-05-23 13:20:58 +02:00
Sébastien Helleu f935aa3f9f ci: bump Lua from 5.3 to 5.4 2026-05-23 13:20:44 +02:00
Sébastien Helleu 76a7d5d3bd debian: bump Lua from 5.3 to 5.4 2026-05-23 13:20:43 +02:00
Luc Schrijvers f0f77e1bd9 Build fix for Haiku 2026-05-23 13:19:08 +02:00
LuK1337 8c0a3b4d81 cmake: enable position independent code (PIE)
Fixes the following build error when compiling Fedora 45 RPM:

/usr/bin/ld.bfd: tests/unit/CMakeFiles/tests.dir/tests.cpp.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld.bfd: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status

See: https://cmake.org/cmake/help/latest/prop_tgt/POSITION_INDEPENDENT_CODE.html
     https://cmake.org/cmake/help/latest/policy/CMP0083.html
2026-05-23 12:40:20 +02:00
Sébastien Helleu a4a06f255a Version 4.9.1-dev 2026-05-23 12:40:02 +02:00
Sébastien Helleu 5969f9faf6 Version 4.9.0 v4.9.0 2026-03-29 10:20:23 +02:00
Sébastien Helleu b70b484f5f debian: update changelog 2026-03-28 22:31:27 +01:00
Sébastien Helleu b250d71608 debian: remove redundant priority optional field from control 2026-03-28 22:29:00 +01:00
Sébastien Helleu 94457f8313 debian: bump Standards-Version to 4.7.3 2026-03-28 22:27:09 +01:00
Sébastien Helleu 0cd0e7be6a core: remove link to Diaspora* from README 2026-03-27 19:22:37 +01:00
Sébastien Helleu 2ececc1184 core: remove link to Slant from README 2026-03-27 19:21:55 +01:00
Sébastien Helleu b8bef1c3e1 irc: fix display of CTCP query sent multiple times to the same user when capability echo-message is enabled (closes #2309) 2026-03-27 18:32:31 +01:00
Sébastien Helleu d9e56c3df8 ci: add check of gettext files with poexam 2026-03-25 21:49:02 +01:00
Emir SARI dc28050b8b core: update Turkish translations 2026-03-25 08:46:52 +01:00
Sébastien Helleu f53e7fb9ef core, plugins: fix typos in comments on functions, use imperative 2026-03-23 20:45:36 +01:00
Sébastien Helleu d34eb40187 core: set max curl version to 8.20.0 for RTMP symbols
rtmp support has been dropped in curl, see:
https://github.com/curl/curl/commit/ceae02db040de3cf7ae4c3f8ec99e8286b568c2e
2026-03-21 17:59:48 +01:00
Sébastien Helleu 2cbbb677f3 core: replace "motdepasse" by "mot_de_passe" in French translations and docs 2026-03-21 17:30:12 +01:00
Sébastien Helleu f7267bc992 core: replace "mypassword" by "my_password" in /help secure 2026-03-21 17:27:02 +01:00
Sébastien Helleu 147d5b3f88 core: replace "mynick" by "andrew" in /help secure 2026-03-21 17:22:20 +01:00
Sébastien Helleu da4881959e core: replace "proxyname" by "proxy_name" in /help proxy 2026-03-21 13:28:38 +01:00
Sébastien Helleu 5e963c7546 core: replace "barname" by "bar_name" in /help bar 2026-03-21 13:23:55 +01:00
Sébastien Helleu 41d8e06394 ci: fix branch for Homebrew/actions/setup-homebrew 2026-03-21 12:01:08 +01:00
Sébastien Helleu 52d1245bad ci: bump actions/checkout to v6 2026-03-21 11:46:30 +01:00
Sébastien Helleu 961dc515a0 ci: add new job "checks" to check gettext files, shell and Python scripts, Python stub file and Curl symbols 2026-03-21 11:44:24 +01:00
Sébastien Helleu 73ec7c0641 ci: reorder and rename jobs 2026-03-21 11:28:11 +01:00
Sébastien Helleu c60a5fde14 ci: remove temporary fix for brew install 2026-03-21 10:15:14 +01:00