From mboxrd@z Thu Jan 1 00:00:00 1970 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 C70222135CA for ; Wed, 26 Feb 2025 02:13: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=1740535982; cv=none; b=H9foa1FsYPGEvlcdJKHWLvaHoUTSp1GEacUEv3eewd76gAnTHSgcIojWd4LZEw5GGdYmKkcMTGcZF4EmFtovgsHHJfWr3EApq94L3nXgOCG1cCEpotpqG+4dNV0GnzP+f1DZhTiaoe1ErzjQo6MjRX7u8D74KfPqd+EpUNzqvN4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535982; c=relaxed/simple; bh=egVFBrfLaLLQKkb/SOoqDZAUsPZ8BbS3V/cGa4xOtk0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tifyEOR6yZ2ajlhx9G9BjhLazHsauhq7rOGKorNepNCAnagWi9uR21AjGTGX5iCzHrY4ei5nWN+P699i4ZjHyK/xkzxlTknkvZ6IssH/nKJ8poO5755z3fd3li/DGYWVtJlkgBegtMh8JAK05b4H16DKFEQUXAxYgghDahG/PLQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fRPMJ/ca; 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="fRPMJ/ca" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93DE3C4CEE6; Wed, 26 Feb 2025 02:13:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535982; bh=egVFBrfLaLLQKkb/SOoqDZAUsPZ8BbS3V/cGa4xOtk0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=fRPMJ/can72qq5KvGK/hV3rI7qpptJ//sTGFTSqP9UyCdf9bOy73Bw9cbDqFiMvuK SfUP+b8zk9tISSpc4NmDDAzhQCyMWeqlEZu9U5nhL55/zZ6Ra6IFRQTJ92buABmJMg 4OeUDkPY+zbKAjbx+irpZzq2iw9jH/5D3b1PwxeI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49329: vduse: Fix NULL pointer dereference on sysfs access Date: Wed, 26 Feb 2025 03:10:03 +0100 Message-ID: <2025022639-CVE-2022-49329-ed73@gregkh> X-Mailer: git-send-email 2.48.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=3703; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=egVFBrfLaLLQKkb/SOoqDZAUsPZ8BbS3V/cGa4xOtk0=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7yh9/6Vnmt+FR2L71S0IajH0uhK79s/xF5nn+2koFM ZfnUZ6bOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAifpcZ5ocduFEbFfWGP/G7 gOnpn3vvl818+J5hnu4uFp+PUxIeslpWiV64zvHL+UzlNwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: vduse: Fix NULL pointer dereference on sysfs access The control device has no drvdata. So we will get a NULL pointer dereference when accessing control device's msg_timeout attribute via sysfs: [ 132.841881][ T3644] BUG: kernel NULL pointer dereference, address: 00000000000000f8 [ 132.850619][ T3644] RIP: 0010:msg_timeout_show (drivers/vdpa/vdpa_user/vduse_dev.c:1271) [ 132.869447][ T3644] dev_attr_show (drivers/base/core.c:2094) [ 132.870215][ T3644] sysfs_kf_seq_show (fs/sysfs/file.c:59) [ 132.871164][ T3644] ? device_remove_bin_file (drivers/base/core.c:2088) [ 132.872082][ T3644] kernfs_seq_show (fs/kernfs/file.c:164) [ 132.872838][ T3644] seq_read_iter (fs/seq_file.c:230) [ 132.873578][ T3644] ? __vmalloc_area_node (mm/vmalloc.c:3041) [ 132.874532][ T3644] kernfs_fop_read_iter (fs/kernfs/file.c:238) [ 132.875513][ T3644] __kernel_read (fs/read_write.c:440 (discriminator 1)) [ 132.876319][ T3644] kernel_read (fs/read_write.c:459) [ 132.877129][ T3644] kernel_read_file (fs/kernel_read_file.c:94) [ 132.877978][ T3644] kernel_read_file_from_fd (include/linux/file.h:45 fs/kernel_read_file.c:186) [ 132.879019][ T3644] __do_sys_finit_module (kernel/module.c:4207) [ 132.879930][ T3644] __ia32_sys_finit_module (kernel/module.c:4189) [ 132.880930][ T3644] do_int80_syscall_32 (arch/x86/entry/common.c:112 arch/x86/entry/common.c:132) [ 132.881847][ T3644] entry_INT80_compat (arch/x86/entry/entry_64_compat.S:419) To fix it, don't create the unneeded attribute for control device anymore. The Linux kernel CVE team has assigned CVE-2022-49329 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit c8a6153b6c59d95c0e091f053f6f180952ade91e and fixed in 5.15.47 with commit 3a7a81f4835dfda11f39fdd27586da14331896eb Issue introduced in 5.15 with commit c8a6153b6c59d95c0e091f053f6f180952ade91e and fixed in 5.17.15 with commit 30fd1b56621e187346f65d01fe34870634b15188 Issue introduced in 5.15 with commit c8a6153b6c59d95c0e091f053f6f180952ade91e and fixed in 5.18.4 with commit b22fdee17ec62604060fb0fda5e1414b634666e1 Issue introduced in 5.15 with commit c8a6153b6c59d95c0e091f053f6f180952ade91e and fixed in 5.19 with commit b27ee76c74dc831d6e092eaebc2dfc9c0beed1c9 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-2022-49329 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/vdpa/vdpa_user/vduse_dev.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/3a7a81f4835dfda11f39fdd27586da14331896eb https://git.kernel.org/stable/c/30fd1b56621e187346f65d01fe34870634b15188 https://git.kernel.org/stable/c/b22fdee17ec62604060fb0fda5e1414b634666e1 https://git.kernel.org/stable/c/b27ee76c74dc831d6e092eaebc2dfc9c0beed1c9