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 20083391E7F for ; Wed, 27 May 2026 09:25:11 +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=1779873915; cv=none; b=OeDmKviMvBEtFCGukjqQo67LPb2phTQ0WsUYYdMUMvm7R7GIL9Q9u9OSQOjprGy5VMVueT5o1/Hq6CM0hCRjTBluMt7GxaosIIs/kLysaYqWOsk0Xx6ft0wLIoOLVHI9Mo7jIdHfApwid6Jkn1E/qEEmnUttKyzr1V3W+2/GgDE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779873915; c=relaxed/simple; bh=XtjbM8zeYU30KfMsOMcYX20slsYpvWrrFmFHpg/49SI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=JGu5yjYsXTXMy4viwh6W5w/MxntZL92iJfgGQRb6Mi7nBKsIajN9mHYWUwW3svnsy8ZA5UU85MqjrxZf0WIdyk3rhZ26xaR+2rb9MLxJ3jTGvNA1hRFttpqgadaDsY6vDAyFmlVxvff589378D9z/r8kq0lz0D5MEqgc9Ulz1k4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tB8DYHVY; 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="tB8DYHVY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32B621F00A3A; Wed, 27 May 2026 09:25:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779873910; bh=YQ8iq8cOoEq/yMVeQ3F2H2bzxob8kAXFtWELa8IIhEg=; h=From:To:Cc:Subject:Date:Reply-To; b=tB8DYHVYb6MvkETBaNPUZ3fMhQ/MoO9VuuZ8tJ07z0Wd4E5iZZDCL6cH24hsE2k92 SniSkojI/DeCwdT+DB8+T/mEeHieKxwD4sdsPxq9zhKNwNc+F0vF4yFzHbIc0iazFC +RLVtNCX0o86HIZ82dg857wn1TrOtmiJy2KTdFTw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-45837: bpf: Fix use-after-free in arena_vm_close on fork Date: Wed, 27 May 2026 11:24:09 +0200 Message-ID: <2026052708-CVE-2026-45837-c50b@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=3460; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=htImcxY8SvcYsp27tr3JBhYFhjyIkvm/+fgmbTZAJAY=; b=owGbwMvMwCRo6H6F97bub03G02pJDFliOyz0LddXXfjysnhl4Z337ouLZqS4i1+NY1yzRGRBX wRD06r1HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCR0/EM87Ma/90NrulXi+FP d97M0ZHQ8HSKAMOCnq8XYrImmx64Gf7l+gwxXbOYZ1efAAA= 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: bpf: Fix use-after-free in arena_vm_close on fork arena_vm_open() only bumps vml->mmap_count but never registers the child VMA in arena->vma_list. The vml->vma always points at the parent VMA, so after parent munmap the pointer dangles. If the child then calls bpf_arena_free_pages(), zap_pages() reads the stale vml->vma triggering use-after-free. Fix this by preventing the arena VMA from being inherited across fork with VM_DONTCOPY, and preventing VMA splits via the may_split callback. Also reject mremap with a .mremap callback returning -EINVAL. A same-size mremap(MREMAP_FIXED) on the full arena VMA reaches copy_vma() through the following path: check_prep_vma() - returns 0 early: new_len == old_len skips VM_DONTEXPAND check prep_move_vma() - vm_start == old_addr and vm_end == old_addr + old_len so may_split is never called move_vma() copy_vma_and_data() copy_vma() vm_area_dup() - copies vm_private_data (vml pointer) vm_ops->open() - bumps vml->mmap_count vm_ops->mremap() - returns -EINVAL, rollback unmaps new VMA The refcount ensures the rollback's arena_vm_close does not free the vml shared with the original VMA. The Linux kernel CVE team has assigned CVE-2026-45837 to this issue. Affected and fixed versions =========================== Issue introduced in 6.9 with commit 317460317a02a1af512697e6e964298dedd8a163 and fixed in 6.12.88 with commit 723b9fa930cc277c15ce6b9ec9feec828cfac9d7 Issue introduced in 6.9 with commit 317460317a02a1af512697e6e964298dedd8a163 and fixed in 6.18.30 with commit d18099f19e53250f8ad2801498b88cec29d9107a Issue introduced in 6.9 with commit 317460317a02a1af512697e6e964298dedd8a163 and fixed in 7.0.7 with commit 201128fcc7b213d27ab77bc4e89488b41796480f Issue introduced in 6.9 with commit 317460317a02a1af512697e6e964298dedd8a163 and fixed in 7.1-rc1 with commit 4fddde2a732de60bb97e3307d4eb69ac5f1d2b74 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-45837 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: kernel/bpf/arena.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/723b9fa930cc277c15ce6b9ec9feec828cfac9d7 https://git.kernel.org/stable/c/d18099f19e53250f8ad2801498b88cec29d9107a https://git.kernel.org/stable/c/201128fcc7b213d27ab77bc4e89488b41796480f https://git.kernel.org/stable/c/4fddde2a732de60bb97e3307d4eb69ac5f1d2b74