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 B8DBE21364 for ; Wed, 18 Sep 2024 06:32:44 +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=1726641164; cv=none; b=MJ61wUnrC+DFjp9CXRRV6nU+WDbkhYo6qMrqsIcKSnZhbhWQYUwlodHw4MgNDhu4KgC77Gt6+IT2FMqo9iKLKBlZpxJT8sLWPI2bblcKNGL7SWrk3h4LexrTlqoTDW0L4ZKTqDQOjVB6gfS0Zk6e4Zt5dRYIe4cHT0TiD20qfD8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726641164; c=relaxed/simple; bh=1kcw6IatBx30vlJaAwBhA2Ttn9pTPj82YizTtDB3pEw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=IskFuWzyhzFEpJlq/TPyq8tRYPM2vcz1L0bETGPfjeRJWcgA/1q+sqOPuZQ2FuivXUUQ7ethN/ECTFV93Dy0xptub3q5/DZsVCE5KrX9rm9DxmMg+WgdstfexCdqK87ZHaJZOBT2ADcc9DQhNa1b6p9AcRbopjbYwhWf2V/2QTQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DmFNiY46; 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="DmFNiY46" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC98AC4CECD; Wed, 18 Sep 2024 06:32:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1726641164; bh=1kcw6IatBx30vlJaAwBhA2Ttn9pTPj82YizTtDB3pEw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=DmFNiY46Tx2XVRbXgHlp7O4D/mYWCbNGoTZoCI9bQJGnCObLlU1TZEdZese5bNZB0 FgQLvoXTjft2Lx1nRsJ/SCJO/lBQSBxc9XtkVDBRKhwT6WD82dfU1kk/wYbEO4LYll sGEN2vZImXG3t7twlSaMKHWim5GsSLHcmL35UcFM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-46715: driver: iio: add missing checks on iio_info's callback access Date: Wed, 18 Sep 2024 08:32:32 +0200 Message-ID: <2024091833-CVE-2024-46715-7e7b@gregkh> X-Mailer: git-send-email 2.46.0 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=2946; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=1kcw6IatBx30vlJaAwBhA2Ttn9pTPj82YizTtDB3pEw=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmvShi72Xc0H2Ro/86/JPW7+aHjr+LrnzUK3OJeGGs57 V39b8e8jlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIlyKGedavt/NIbsgUsvwj /dthMXNJy2WFUIb58av3T98z6yjXujkBO0M2VqQztosfAAA= 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: driver: iio: add missing checks on iio_info's callback access Some callbacks from iio_info structure are accessed without any check, so if a driver doesn't implement them trying to access the corresponding sysfs entries produce a kernel oops such as: [ 2203.527791] Unable to handle kernel NULL pointer dereference at virtual address 00000000 when execute [...] [ 2203.783416] Call trace: [ 2203.783429] iio_read_channel_info_avail from dev_attr_show+0x18/0x48 [ 2203.789807] dev_attr_show from sysfs_kf_seq_show+0x90/0x120 [ 2203.794181] sysfs_kf_seq_show from seq_read_iter+0xd0/0x4e4 [ 2203.798555] seq_read_iter from vfs_read+0x238/0x2a0 [ 2203.802236] vfs_read from ksys_read+0xa4/0xd4 [ 2203.805385] ksys_read from ret_fast_syscall+0x0/0x54 [ 2203.809135] Exception stack(0xe0badfa8 to 0xe0badff0) [ 2203.812880] dfa0: 00000003 b6f10f80 00000003 b6eab000 00020000 00000000 [ 2203.819746] dfc0: 00000003 b6f10f80 7ff00000 00000003 00000003 00000000 00020000 00000000 [ 2203.826619] dfe0: b6e1bc88 bed80958 b6e1bc94 b6e1bcb0 [ 2203.830363] Code: bad PC value [ 2203.832695] ---[ end trace 0000000000000000 ]--- The Linux kernel CVE team has assigned CVE-2024-46715 to this issue. Affected and fixed versions =========================== Fixed in 6.1.109 with commit 0cc7e0ee31e5 Fixed in 6.6.50 with commit 72f022ebb9de Fixed in 6.10.9 with commit dc537a72f648 Fixed in 6.11 with commit c4ec8dedca96 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-2024-46715 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/iio/industrialio-core.c drivers/iio/industrialio-event.c drivers/iio/inkern.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/0cc7e0ee31e5c44904e98e2229d591e093282a70 https://git.kernel.org/stable/c/72f022ebb9deac28663fa4c04ba315ed5d6654d1 https://git.kernel.org/stable/c/dc537a72f64890d883d24ae4ac58733fc5bc523d https://git.kernel.org/stable/c/c4ec8dedca961db056ec85cb7ca8c9f7e2e92252