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 3CE3B38C401 for ; Wed, 24 Jun 2026 07:14:58 +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=1782285300; cv=none; b=uaAzceMrGG0zZo3S/Yjwa+ZknWrZdpfpsdW52jadWBfXWDD1tgd0/8617IhR5j/HTLNSIgd3KmXighJWUoXkM8Z6KDe36ywFL8q4aBS8HnHrJ/VUjk885T0N5lZP+rOgjIdriI22uUiSP/1yGfLom/iVEepyJcCjN4jNEqBscpY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782285300; c=relaxed/simple; bh=337zyxLZdvcsgSz+Av+8OyS13S4osMcFTdauYIMk/IU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=byp55n508l1SuVYYNNVyJb6jTGsn8rCaabJcULu9NZ4ttgPBvXdJHq7h0xngC5avCcvNj+TCPnUuFgNzJ/I1hp0Q8jgVYgGyDJ1eZ1ZFUckM1P21XgT0BKrjUtvcVo26sA6GnNywthSmpD9gyiIEwvf2TuSH/ibbfLxgSUbUC5o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WTbtpBUB; 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="WTbtpBUB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BA161F000E9; Wed, 24 Jun 2026 07:14:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1782285298; bh=BbpAoroj3AMJBtCpnbo222pyRSbno/uipw4WFUkyBVQ=; h=From:To:Cc:Subject:Date:Reply-To; b=WTbtpBUB4ASZtUnzvfAvD2iravlmpVdGzcU3FgqTD4dAMILsOGI2G32O8x7eA/d5O 6oBsVFRwaIVbrE8puuc9Lwk+mFXIcMw8fZHVFaeu6J02XVOgykY0TQT9ohaXipKthU QNLzyr31Z5FNBsqb9u3Ko6FN7Fdl5BkQQGRVe/BI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-52923: ipc: limit next_id allocation to the valid ID range Date: Wed, 24 Jun 2026 09:13:38 +0200 Message-ID: <2026062431-CVE-2026-52923-35fb@gregkh> X-Mailer: git-send-email 2.54.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=4749; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=bMQ4PhWLVsAXnFRvd/MPuEO5/sBkrNBLOVuOzw9TjIM=; b=owGbwMvMwCRo6H6F97bub03G02pJDFnWzbPdL+2Q9pRTdokJ1Z7zfY3Iv5m6ZVpehq7X54VOm WodavuzI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACZyKoVhftr91LAZ3cyCf31U Ny7dfS/1iV+9P8OC5UVKi90enT45Z7Ftb8gMw5rq1mOxAA== 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: ipc: limit next_id allocation to the valid ID range The checkpoint/restore sysctl path can request the next SysV IPC id through ids->next_id. ipc_idr_alloc() currently forwards that request to idr_alloc() with an open-ended upper bound. If the valid tail of the SysV IPC id space is full, the allocation can spill beyond ipc_mni. The returned SysV IPC id still uses the normal index encoding, so later lookup and removal can target the wrong slot. This leaves the real IDR entry behind and breaks the IDR state for the object. The bug is in ipc_idr_alloc() in the checkpoint/restore path. 1. ids->next_id is passed to: idr_alloc(&ids->ipcs_idr, new, ipcid_to_idx(next_id), 0, ...) 2. The zero upper bound makes the allocation effectively open-ended. Once the valid SysV IPC tail is occupied, idr_alloc() can spill past ipc_mni and allocate an entry beyond the valid IPC id range. 3. The new object id is still encoded with the narrower SysV IPC index width: new->id = (new->seq << ipcmni_seq_shift()) + idx 4. Later removal goes through ipc_rmid(), which uses: ipcid_to_idx(ipcp->id) That truncates the real IDR index. An object actually stored at a high index can then be removed as if it lived at a low in-range index. 5. For shared memory, shm_destroy() frees the current object anyway, but the real high IDR slot is left behind as a dangling pointer. 6. A subsequent walk of /proc/sysvipc/shm reaches the stale IDR entry and dereferences freed memory. Prevent this by bounding the requested allocation to ipc_mni so the checkpoint/restore path fails once the valid range is exhausted. The Linux kernel CVE team has assigned CVE-2026-52923 to this issue. Affected and fixed versions =========================== Issue introduced in 3.8 with commit 03f595668017f1a1fb971c02fc37140bc6e7bb1c and fixed in 5.10.259 with commit 3bbe2bb9111ce6967a951bfac79af142d816fae5 Issue introduced in 3.8 with commit 03f595668017f1a1fb971c02fc37140bc6e7bb1c and fixed in 5.15.210 with commit 8c58a92849175f5e2ab7bc2734b3b89afe79f6ef Issue introduced in 3.8 with commit 03f595668017f1a1fb971c02fc37140bc6e7bb1c and fixed in 6.1.176 with commit af24e202b543ded8a34f1d5d3db54eb916173f04 Issue introduced in 3.8 with commit 03f595668017f1a1fb971c02fc37140bc6e7bb1c and fixed in 6.6.143 with commit 157ce2c6836ce0ff19108a819f38df061345425f Issue introduced in 3.8 with commit 03f595668017f1a1fb971c02fc37140bc6e7bb1c and fixed in 6.12.93 with commit 41058d4c3f63ab64901560a704882e0565f4e456 Issue introduced in 3.8 with commit 03f595668017f1a1fb971c02fc37140bc6e7bb1c and fixed in 6.18.35 with commit a3cc795129e5ec0f8948653a3bf471e7d8852f5e Issue introduced in 3.8 with commit 03f595668017f1a1fb971c02fc37140bc6e7bb1c and fixed in 7.0.12 with commit bd4be70669af55b974860d13680348cfdf50bbed Issue introduced in 3.8 with commit 03f595668017f1a1fb971c02fc37140bc6e7bb1c and fixed in 7.1 with commit fa0b9b2b7ae3539908d69c2b9ac0d144d9bc5139 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-52923 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: ipc/util.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/3bbe2bb9111ce6967a951bfac79af142d816fae5 https://git.kernel.org/stable/c/8c58a92849175f5e2ab7bc2734b3b89afe79f6ef https://git.kernel.org/stable/c/af24e202b543ded8a34f1d5d3db54eb916173f04 https://git.kernel.org/stable/c/157ce2c6836ce0ff19108a819f38df061345425f https://git.kernel.org/stable/c/41058d4c3f63ab64901560a704882e0565f4e456 https://git.kernel.org/stable/c/a3cc795129e5ec0f8948653a3bf471e7d8852f5e https://git.kernel.org/stable/c/bd4be70669af55b974860d13680348cfdf50bbed https://git.kernel.org/stable/c/fa0b9b2b7ae3539908d69c2b9ac0d144d9bc5139