| Message ID | 84206f9941fef85254d6ad34d50971cf115d6af2.1787506908.git.loukot@gmail.com |
|---|---|
| State | New |
| Headers | show
Return-Path:
<hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
secure) header.d=lists.infradead.org header.i=@lists.infradead.org
header.a=rsa-sha256 header.s=bombadil.20210309 header.b=4M/+cmVU;
dkim=fail reason="signature verification failed" (2048-bit key;
unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256
header.s=20251104 header.b=dyTPziZs;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.infradead.org
(client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;
envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;
receiver=patchwork.ozlabs.org)
Received: from bombadil.infradead.org (bombadil.infradead.org
[IPv6:2607:7c80:54:3::133])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4hT2hw2W8Cz1xvQ
for <incoming@patchwork.ozlabs.org>; Mon, 24 Aug 2026 17:33:52 +1000 (AEST)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20210309; h=Sender:
Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:
List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:
Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description:
Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
List-Owner; bh=4T6VTvYz7oCOd3Ci+A/4YNuCxhg/H8006KHdG5syspE=; b=4M/+cmVUgwPa0S
335et5FFoo3855llpzkiBInzpFWobrFwc3cSHLkWHGmXkfizkJI2ly4pWPg8U9phqITyjA2hnKoR3
qpmU7f6V4/98QJWz/SiYTRxj9CjNuJWsp52K2tF1CP1djjE7k28clOyInuLwymNA2XAFOBUmhnELP
MsZV3typd8e2SRpXwEJqwQKi1KBEpMZZ6iIuqtbUzzwSnFCD03a0EWi2hdeZR4T1/mQsVtPosBzUk
phW3rL9ZR3fs1x4PxbDWfqIciHD2CJVy2PfLcEtBWyTq/G6VtryvEdolHvMVdN+9cxqbyr4pEVuP4
el4BwDtJdykf/ijbFDJg==;
Received: from localhost ([::1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux))
id 1wyP9z-0000000G5Rw-2POl;
Mon, 24 Aug 2026 07:31:59 +0000
Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331])
by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux))
id 1wyP9v-0000000G5QI-18jc
for hostap@lists.infradead.org;
Mon, 24 Aug 2026 07:31:56 +0000
Received: by mail-wm1-x331.google.com with SMTP id
5b1f17b1804b1-499d1ab3f9dso830025e9.3
for <hostap@lists.infradead.org>;
Mon, 24 Aug 2026 00:31:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1787556713; x=1788161513;
darn=lists.infradead.org;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:to:from:from:to:cc:subject:date:message-id
:reply-to:content-type;
bh=k8COZsjZudaafsJyNZHz5tWros12gVx0kFfSs80CKa0=;
b=dyTPziZs6inxpfSAF6rBWaYMAzjjjCX7GImyT4Ws9BTqeCGje0q3MSQBg6J3mnKSAJ
wPBjMpy/FEWbFILidQGlrCZHpjmS4qQQxHmODJmLEZMYXesgXWdyKkNKBLBqgttzCZIe
l81w+QdhHUYvHBHzJjJqe1Kg31pTUjhKe/e4dk+LRV1V6ZgQ/nrqGXNkuEEwhK5eiOWJ
9NW/7CcloohK/yzc4taE+NrcpgVNQeJB05uY6QxvQeDvThiQ9r+8ZPrQJLt5HzOGMXsf
qj7uSHn/Slbd7Ev+XQsv8reD4hkHQtCpBCG7X8oYJG2qt2te+g46unF7fTRF2MXbuQRs
rqmA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20251104; t=1787556713; x=1788161513;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to
:cc:subject:date:message-id:reply-to:content-type;
bh=k8COZsjZudaafsJyNZHz5tWros12gVx0kFfSs80CKa0=;
b=fxk7teRr+hcOcvNYs7fsMjCSHEMZJVNPjPu3wx8XiJKY1tOJviOA3R+P3/x39Y28F6
8dN+3Y3Er17DytiSPvX+VkD37cXaIC+23zE4Q00fcZZHdWNd3zhA7zTUZafmvyIeRJE6
t344Pweyj1h+4fiqmsYFKHu9+dBgBGJ+aWvMFSfm8nqZqrSTPmmrXncoUQibin0VCYXD
tcIlUgjgXuNUcizI6T/a44mJCwqmJPonbcQ4kw+BzXtFwBZw1QFd6RIUR0sVeXgWKM9r
GsdG4k412pddeyvxjwPBc5l5c4aiiGLTgE7KJmqT5QWTAhaJJ4xx7fz/ye+KqfFgo7ZD
P5rA==
X-Gm-Message-State: AFuF++kuEEq6YL19TrNF8lZWraqnM/pKSSWaeXQOehJn8k41UY33RUZe
rItOaIFeDwFhXTeAZ9DG1IiH6Ti7cJrzGZ/qHoO/WVoE600EyF93BLtH0hNRMg==
X-Gm-Gg: AR+sD124tcL09uV60fbckS+UHlR8F+jOPylc6H6EvoD6JqSntnCX5UGMmS0J9SG77SV
EAupwN4qH4s3yrNyzPblcgjJKBYRrzhmkfDNg6gTb9pL3uiTwco9X9MEw+MIFm1Wf9tCU3L05QZ
0B/X3Hqx0oN7qVoa1R7GjGHfFp6TFukFDWRFrGzyCN3BMHWY6HJc8jqQAxWYkoc7rIr8a8Tjqic
wwIQjwV/pAiHrarG3yfcoPnB1GXw1MLiZQdYlJi4LjWBP8bqj13VPJ9l5Rw81LujDZArQm+Do3x
mASSV5miK4WY8+eUoJhDeg0pirknalkme8RHOaccYOQy5vvu8FIFGzlvSau2HEwcf1SS+So6KBp
58vrKeMJJJb+bbe9hnKe6YSHQIyALqtvLyEiIfPP745Ju9G5W4JVMRlsif0LxqY2xKd9mwKsQbs
Q8XvPWRToA0A2EUG06lO3+0RSom4P+8L56LzqQjiNxCKMZ7vwt/0oMxyVroaHWLqyS+HUUy/b8K
4obY6eYw+Tiy78aUExoMlo=
X-Received: by 2002:a05:600c:628d:b0:499:4892:d022 with SMTP id
5b1f17b1804b1-499c19bd51emr156134135e9.8.1787556713400;
Mon, 24 Aug 2026 00:31:53 -0700 (PDT)
Received: from localhost ([102.128.173.0])
by smtp.gmail.com with ESMTPSA id
5b1f17b1804b1-499c359b95dsm77660855e9.11.2026.08.24.00.31.52
for <hostap@lists.infradead.org>
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Mon, 24 Aug 2026 00:31:53 -0700 (PDT)
From: Louis Kotze <loukot@gmail.com>
To: hostap@lists.infradead.org
Subject: [PATCH 1/3] MLD: Fix off-by-one read of Common Info Length in Basic
MLE accessors
Date: Mon, 24 Aug 2026 09:31:45 +0200
Message-ID:
<84206f9941fef85254d6ad34d50971cf115d6af2.1787506908.git.loukot@gmail.com>
X-Mailer: git-send-email 2.55.0
In-Reply-To: <cover.1787506908.git.loukot@gmail.com>
References: <cover.1787506908.git.loukot@gmail.com>
MIME-Version: 1.0
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20260824_003155_338021_93D40AAA
X-CRM114-Status: GOOD ( 13.78 )
X-Spam-Score: -2.1 (--)
X-Spam-Report: Spam detection software,
running on the system "bombadil.infradead.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: get_basic_mle_eml_capa() and get_basic_mle_link_id()
rejected
buffers shorter than MULTI_LINK_CONTROL_LEN (2) and then read
buf[MULTI_LINK_CONTROL_LEN]
to get the Common Info Length field. A two-octet [...]
Content analysis details: (-2.1 points, 5.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no
trust
[2a00:1450:4864:20:0:0:0:331 listed in]
[list.dnswl.org]
-0.0 SPF_PASS SPF: sender matches SPF record
0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record
0.1 DKIM_SIGNED Message has a DKIM or DK signature,
not necessarily valid
-0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from
envelope-from domain
-0.1 DKIM_VALID Message has at least one valid DKIM or DK
signature
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
author's
domain
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider
[loukot(at)gmail.com]
-0.0 DMARC_PASS DMARC pass policy
X-BeenThere: hostap@lists.infradead.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: <hostap.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/hostap>,
<mailto:hostap-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/hostap/>
List-Post: <mailto:hostap@lists.infradead.org>
List-Help: <mailto:hostap-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/hostap>,
<mailto:hostap-request@lists.infradead.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "Hostap" <hostap-bounces@lists.infradead.org>
Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org
|
| Series |
Multi-Link element fuzzer and an off-by-one it found
|
expand
|
diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c index 4330f3d8c..fd632a6c0 100644 --- a/src/common/ieee802_11_common.c +++ b/src/common/ieee802_11_common.c @@ -3710,7 +3710,8 @@ const u8 * get_basic_mle_eml_capa(const u8 *buf, size_t len) size_t common_info_limit; u8 common_info_len; - if (len < MULTI_LINK_CONTROL_LEN) + /* The Common Info Length field follows the Multi-Link Control field */ + if (len < MULTI_LINK_CONTROL_LEN + 1) return NULL; ctrl = le_to_host16(ml->ml_control); @@ -3755,7 +3756,8 @@ int get_basic_mle_link_id(const u8 *buf, size_t len) u8 common_info_len; u8 link_id; - if (len < MULTI_LINK_CONTROL_LEN) + /* The Common Info Length field follows the Multi-Link Control field */ + if (len < MULTI_LINK_CONTROL_LEN + 1) return -1; ctrl = le_to_host16(ml->ml_control);
get_basic_mle_eml_capa() and get_basic_mle_link_id() rejected buffers shorter than MULTI_LINK_CONTROL_LEN (2) and then read buf[MULTI_LINK_CONTROL_LEN] to get the Common Info Length field. A two-octet buffer therefore passed the check and the following read went one octet past the end. The Common Info Length field follows the Multi-Link Control field, so three octets are needed before it can be read. get_basic_mle_mld_addr() in the same file already accounts for this. This is reachable while processing scan results: mlo_scan_est_throughput() takes the element length from a Beacon or Probe Response frame, skips the element header, and passes the remainder to both accessors. An AP that advertises a Basic Multi-Link element with an element length of 3 leaves exactly two octets and triggers the read before any authentication or association takes place. Found with a new fuzzer for Multi-Link element parsing. Fixes: b6ffe3149321 ("Add helper functions for parsing Basic MLE to fetch EML capa and Link ID") Signed-off-by: Louis Kotze <loukot@gmail.com> --- src/common/ieee802_11_common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)