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 67E8439150D for ; Sun, 19 Jul 2026 12:04:05 +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=1784462646; cv=none; b=ulvQxIU4pztShXrOr0GuOf87c1XQZUvlYXCI6tAvQajCyJFC4Ij8kCj2ZB/KVmaO3Ipva+dMokPMGySLnpg8Ncwr81ivGyt3A+LRYMAbYSTCQoEWtte0SHTkHxMjPRYv0B0PXPjika41SpGnTOlOxyQy0gQczWhfue1vVYjWQI8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784462646; c=relaxed/simple; bh=9di8AbmY5x7SbXIv5TT2XrGmyt4NRKrmYm4116ZbzDw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qLYuEzAuLYi43R6IBGcdolpSRpEzOugMdDEsvw1scladhxhP/9UTPrT9b+0oFixetTE/F28A+vPC0QMw7jqgcCqYO8J2OTT/KGPndnMR3/9yxtNQ3lb5Rnxrx8i00CA8CIhoejZ6xtSdhoGreJMIbIvxVbMuzy9tgmCGRbdffnE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IARV73qk; 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="IARV73qk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FC381F000E9; Sun, 19 Jul 2026 12:04:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784462645; bh=iwyllAWJNjTumZll+yf3EZ/OmkTcZomZdoENIWTnDKE=; h=From:To:Cc:Subject:Date:Reply-To; b=IARV73qkMH+dVOhQfEgbxjvJp2YCrV0LZeUXOn5cpMJ53VCFwJPhCNDKvNP+7mWe0 zWQhMePyZkgX61cma3n2UMKtPRSOSW2VOy2Xj38xTMg3JVZQGs2k7ZguTT0b86SCNB Uky/qiVHh50fojJQAFb4PC7pGQC63lp70nUStlDk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-63825: gcov: use atomic counter updates to fix concurrent access crashes Date: Sun, 19 Jul 2026 14:02:42 +0200 Message-ID: <2026071907-CVE-2026-63825-306e@gregkh> X-Mailer: git-send-email 2.55.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=4291; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=j2gCYv494J5zZ79Cu43u32G9K3QylevsFiQRLHhzUJ8=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkxe/aLBaybEBomdz63nvHgFfvXDmt//nx9xKZzpZad9 +RWCU7TjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjITWmGBUfNz8/4FZi2guHy oQsaLi8bDiu9FGKYxaSz7POCVUuSfxdpdipFFvUk7s0oAgA= 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: gcov: use atomic counter updates to fix concurrent access crashes GCC's GCOV instrumentation can merge global branch counters with loop induction variables as an optimization. In inflate_fast(), the inner copy loops get transformed so that the GCOV counter value is loaded multiple times to compute the loop base address, start index, and end bound. Since GCOV counters are global (not per-CPU), concurrent execution on different CPUs causes the counter to change between loads, producing inconsistent values and out-of-bounds memory writes. The crash manifests during IPComp (IP Payload Compression) processing when inflate_fast() runs concurrently on multiple CPUs: BUG: unable to handle page fault for address: ffffd0a3c0902ffa RIP: inflate_fast+1431 Call Trace: zlib_inflate __deflate_decompress crypto_comp_decompress ipcomp_decompress [xfrm_ipcomp] ipcomp_input [xfrm_ipcomp] xfrm_input At the crash point, the compiler generated three loads from the same global GCOV counter (__gcov0.inflate_fast+216) to compute base, start, and end for an indexed loop. Another CPU modified the counter between loads, making the values inconsistent - the write went 3.4 MB past a 65 KB buffer. Add -fprofile-update=prefer-atomic to CFLAGS_GCOV at the global level in the top-level Makefile, guarded by a try-run compile test. The test compiles a minimal program with and without -fprofile-update=prefer-atomic using the full KBUILD_CFLAGS, then compares undefined symbols in the resulting object files. If prefer-atomic introduces new undefined references (such as __atomic_fetch_add_8 on i386 or __aarch64_ldadd8_relax on arm64 with outline-atomics), the flag is not added -- the kernel does not link against libatomic. On architectures where GCC inlines 64-bit atomic counter updates (x86_64, s390, ...) the test passes and the flag is enabled, preventing the compiler from merging counters with loop induction variables and fixing the observed concurrent-access crash. On architectures where the flag would introduce libatomic dependencies, it is silently omitted and behaviour is no worse than before this patch. Move the CFLAGS_GCOV block from its original position (before the arch Makefile include) to after the core KBUILD_CFLAGS assignments but before the scripts/Makefile.gcc-plugins include. This placement ensures the try-run test sees arch-specific flags (-m32, -march=, -mno-outline-atomics) while avoiding GCC plugin flags (-fplugin=) that would break the test on clean builds when plugin shared objects do not yet exist. The Linux kernel CVE team has assigned CVE-2026-63825 to this issue. Affected and fixed versions =========================== Fixed in 6.18.38 with commit 49d893b9cbcfc5802a32e53a64c6c6956670d65b Fixed in 7.1.3 with commit 5b959c1dbb4522b9e3ac4e26ad638b8784869841 Fixed in 7.2-rc1 with commit 56cb9b7d96b28a1173a510ab25354b6599ad3a33 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-63825 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: Makefile 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/49d893b9cbcfc5802a32e53a64c6c6956670d65b https://git.kernel.org/stable/c/5b959c1dbb4522b9e3ac4e26ad638b8784869841 https://git.kernel.org/stable/c/56cb9b7d96b28a1173a510ab25354b6599ad3a33