Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5891C2ECEA9 for ; Fri, 25 Jul 2025 12:57:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753448222; cv=none; b=imq+mfAy65I5S4AIXjWGb+brkC4adPt/RU3dnftfqEQQrLOKJlGmlhnnqlYb3Quaj5cEEsR7NLr6UzAw4fyXKs1vxerVRPIheN5dJm3jAL86yEU8No/X5jSyXbtQGNMhJEsU5XP8QuLA9dqmUTFyLbBUB1qNzahVQEoNVLiK/YE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753448222; c=relaxed/simple; bh=IIsZCZbnPrdDRiW1ajEn9LC5auYigOX5XjdNMW6yn5A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rT3oKEcS88rRJ8iU92rfRax1cjX2kRodIjabhz2NQvvOBXoXMKYFFAwC/QcFHCD4kXnGqdfEgb8VNj4NalIue/jfs6zNDQRqY6HHXw9lmjXuzV4n3wKCoTQbDB0rVMI6sbJ6nbU7DOoWKZ3PemckxS6/WyfWBE/jwyU25NAHjRA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=cLNuK2go; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="cLNuK2go" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BACFAC4CEE7; Fri, 25 Jul 2025 12:57:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1753448222; bh=IIsZCZbnPrdDRiW1ajEn9LC5auYigOX5XjdNMW6yn5A=; h=From:To:Cc:Subject:Date:Reply-to:From; b=cLNuK2gonqw5fawKv3WRObCVWra1+TLZ+LD37np7O9e3cLZORqYNuKr8Vh2g0J1q2 3qE1wE13tdAhmHF+a1Ym0Lq5TaDDyMxZ5BDpirJa9GVgfL5TE8juprgIedj6fnho8w ciOlfYaifNRZ+YsXzehkFtkacHDi2GdrjQ8rDfDA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38402: idpf: return 0 size for RSS key if not supported Date: Fri, 25 Jul 2025 14:55:33 +0200 Message-ID: <2025072511-CVE-2025-38402-e08c@gregkh> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=4856; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=wM9HW6cVJZSmFfB/XJ3LaXDz7rWhnht5Nc9qvdJzMGQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnNdet1r/iaiO190dQws/S9v1RHsX+2wctVEbuDv72bV nR/c8i6jlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhItTnD/OoVawsErzGc8Hug ODWkLGDh5EsyjQzzvbucz51nZ4wL6te2zRAtqVgduywIAA== 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: idpf: return 0 size for RSS key if not supported Returning -EOPNOTSUPP from function returning u32 is leading to cast and invalid size value as a result. -EOPNOTSUPP as a size probably will lead to allocation fail. Command: ethtool -x eth0 It is visible on all devices that don't have RSS caps set. [ 136.615917] Call Trace: [ 136.615921] [ 136.615927] ? __warn+0x89/0x130 [ 136.615942] ? __alloc_frozen_pages_noprof+0x322/0x330 [ 136.615953] ? report_bug+0x164/0x190 [ 136.615968] ? handle_bug+0x58/0x90 [ 136.615979] ? exc_invalid_op+0x17/0x70 [ 136.615987] ? asm_exc_invalid_op+0x1a/0x20 [ 136.616001] ? rss_prepare_get.constprop.0+0xb9/0x170 [ 136.616016] ? __alloc_frozen_pages_noprof+0x322/0x330 [ 136.616028] __alloc_pages_noprof+0xe/0x20 [ 136.616038] ___kmalloc_large_node+0x80/0x110 [ 136.616072] __kmalloc_large_node_noprof+0x1d/0xa0 [ 136.616081] __kmalloc_noprof+0x32c/0x4c0 [ 136.616098] ? rss_prepare_get.constprop.0+0xb9/0x170 [ 136.616105] rss_prepare_get.constprop.0+0xb9/0x170 [ 136.616114] ethnl_default_doit+0x107/0x3d0 [ 136.616131] genl_family_rcv_msg_doit+0x100/0x160 [ 136.616147] genl_rcv_msg+0x1b8/0x2c0 [ 136.616156] ? __pfx_ethnl_default_doit+0x10/0x10 [ 136.616168] ? __pfx_genl_rcv_msg+0x10/0x10 [ 136.616176] netlink_rcv_skb+0x58/0x110 [ 136.616186] genl_rcv+0x28/0x40 [ 136.616195] netlink_unicast+0x19b/0x290 [ 136.616206] netlink_sendmsg+0x222/0x490 [ 136.616215] __sys_sendto+0x1fd/0x210 [ 136.616233] __x64_sys_sendto+0x24/0x30 [ 136.616242] do_syscall_64+0x82/0x160 [ 136.616252] ? __sys_recvmsg+0x83/0xe0 [ 136.616265] ? syscall_exit_to_user_mode+0x10/0x210 [ 136.616275] ? do_syscall_64+0x8e/0x160 [ 136.616282] ? __count_memcg_events+0xa1/0x130 [ 136.616295] ? count_memcg_events.constprop.0+0x1a/0x30 [ 136.616306] ? handle_mm_fault+0xae/0x2d0 [ 136.616319] ? do_user_addr_fault+0x379/0x670 [ 136.616328] ? clear_bhb_loop+0x45/0xa0 [ 136.616340] ? clear_bhb_loop+0x45/0xa0 [ 136.616349] ? clear_bhb_loop+0x45/0xa0 [ 136.616359] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 136.616369] RIP: 0033:0x7fd30ba7b047 [ 136.616376] Code: 0c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 f3 0f 1e fa 80 3d bd d5 0c 00 00 41 89 ca 74 10 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 71 c3 55 48 83 ec 30 44 89 4c 24 2c 4c 89 44 [ 136.616381] RSP: 002b:00007ffde1796d68 EFLAGS: 00000202 ORIG_RAX: 000000000000002c [ 136.616388] RAX: ffffffffffffffda RBX: 000055d7bd89f2a0 RCX: 00007fd30ba7b047 [ 136.616392] RDX: 0000000000000028 RSI: 000055d7bd89f3b0 RDI: 0000000000000003 [ 136.616396] RBP: 00007ffde1796e10 R08: 00007fd30bb4e200 R09: 000000000000000c [ 136.616399] R10: 0000000000000000 R11: 0000000000000202 R12: 000055d7bd89f340 [ 136.616403] R13: 000055d7bd89f3b0 R14: 000055d78943f200 R15: 0000000000000000 The Linux kernel CVE team has assigned CVE-2025-38402 to this issue. Affected and fixed versions =========================== Issue introduced in 6.7 with commit 02cbfba1add5bd9088c7d14c6b93b77a6ea8f3bb and fixed in 6.12.37 with commit 018ff57fd79c38be989b8b3248bbe69bcfb77160 Issue introduced in 6.7 with commit 02cbfba1add5bd9088c7d14c6b93b77a6ea8f3bb and fixed in 6.15.6 with commit 326e384ee7acbebf0541ac064ac7a4dd1f1dde1d Issue introduced in 6.7 with commit 02cbfba1add5bd9088c7d14c6b93b77a6ea8f3bb and fixed in 6.16-rc5 with commit f77bf1ebf8ff6301ccdbc346f7b52db928f9cbf8 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-2025-38402 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/net/ethernet/intel/idpf/idpf_ethtool.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/018ff57fd79c38be989b8b3248bbe69bcfb77160 https://git.kernel.org/stable/c/326e384ee7acbebf0541ac064ac7a4dd1f1dde1d https://git.kernel.org/stable/c/f77bf1ebf8ff6301ccdbc346f7b52db928f9cbf8