From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CCD663469E7 for ; Sat, 25 Jul 2026 08:52:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784969540; cv=none; b=RfDvU7GOXaaMBvjf/tXjeKcVxkBER45iNBHRtMhlsGc867iIxlLTqKy3NvQ1UXIsSLuzRAePFc2SyfSEkMhSIhNM5w6Z65U8eb/XgQmuyO893qXWWYiPrNXJ672zhMTbD+vFTwtBz//SgFldN5VM6nBaZsLoI+U+xs2kYvJp+Io= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784969540; c=relaxed/simple; bh=O8s1Y47E0nRDxdEjqH4DKL8F9ipVAuO94sTzWs7BlZg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Nz4hy3WgpVUVK/DxWgokGP3u32GdFypQLQDtwodU+RiuWI/t73nQVZsvGXhuJW2TRxvGQskxLbmxGD1aqjBC8/vQFkkMsTR8uzPmmTzzFucs243yW4HG3oEx8O3RNPbzCDlBZMQm5VTxy7Zd3IRXqLSPgby5YjBgqDG+iWwhZpQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=iLlmMNX9; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="iLlmMNX9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6F431F000E9; Sat, 25 Jul 2026 08:52:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784969539; bh=X/gy4twbmF0c1ve2mKeoLgy074RODAh4dbUiilRYbTE=; h=From:To:Cc:Subject:Date:Reply-To; b=iLlmMNX9LePgx/F9bq5k0IxziMmszhr82EC7s2HubpoOLEG2NYUhzFMZj4yfQkTCz g4h/tdpQCaP/jDgpvzOsftW6oruhM18q0QKUVEyEPrNf5zpeZLyU+O1qwz08ToiLDP nf5OyshUDd7DHirnD7dejQgs4kX9m4yKKmcOkQCY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-64293: iommufd: Use sizeof(*hdr) instead of sizeof(hdr) in veventq read Date: Sat, 25 Jul 2026 10:48:30 +0200 Message-ID: <2026072505-CVE-2026-64293-760d@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3391; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=fYkCOMZKDOsMP6g06jp+quc7nLqDbpY5rA4oe4pNgTY=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkpFa5aR9gtmN+YynhVrqq/vnfhu5cfvpvWxH8pq1ja8 9tN6+/hjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIejTDHK7Qg3u9G9fXCKrZ T9/6Pdbk4Orldxjm56/48apqb5nBSeOlhUJFh4zdJZceAwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: iommufd: Use sizeof(*hdr) instead of sizeof(hdr) in veventq read The bound-check in iommufd_veventq_fops_read() for the normal vEVENT path uses sizeof(hdr) where the surrounding code uses sizeof(*hdr): if (!vevent_for_lost_events_header(cur) && sizeof(hdr) + cur->data_len > count - done) { hdr is declared as struct iommufd_vevent_header *, so sizeof(hdr) evaluates to the size of the pointer. Surrounding code uses sizeof(*hdr) consistently: if (done >= count || sizeof(*hdr) > count - done) { ... if (copy_to_user(buf + done, hdr, sizeof(*hdr))) { ... done += sizeof(*hdr); struct iommufd_vevent_header is currently 8 bytes (two __u32 fields, flags and sequence), so on 64-bit (sizeof(void *) == 8) the two expressions happen to be equal and the check works as intended. On 32-bit (sizeof(void *) == 4) the check under-counts the header by 4 bytes: a vEVENT whose data_len causes 8 + cur->data_len to exceed count - done while 4 + cur->data_len does not will pass the check, then the loop will copy_to_user 8 bytes of header followed by data_len bytes of payload, writing past the user-supplied buffer. It is also a latent bug for any future expansion of struct iommufd_vevent_header beyond sizeof(void *) on 64-bit; the check should not depend on the type happening to match the host pointer width. Use sizeof(*hdr) to match the rest of the function and the actual amount that will be copied. The Linux kernel CVE team has assigned CVE-2026-64293 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit e36ba5ab808ef6237c3148d469c8238674230e2b and fixed in 6.18.39 with commit 04a177f91160ee18da98f5689482cf0f589ec869 Issue introduced in 6.15 with commit e36ba5ab808ef6237c3148d469c8238674230e2b and fixed in 7.1.4 with commit 0cdbb97a4dbd69abdd2ab998b4fbc7803d4b0b72 Issue introduced in 6.15 with commit e36ba5ab808ef6237c3148d469c8238674230e2b and fixed in 7.2-rc1 with commit be93d186ae88a92e7aa77e122d4e661fa57b1e39 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-64293 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/iommu/iommufd/eventq.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/04a177f91160ee18da98f5689482cf0f589ec869 https://git.kernel.org/stable/c/0cdbb97a4dbd69abdd2ab998b4fbc7803d4b0b72 https://git.kernel.org/stable/c/be93d186ae88a92e7aa77e122d4e661fa57b1e39