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 57FBE3C0B for ; Wed, 19 Jun 2024 13:37:10 +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=1718804230; cv=none; b=rykhaacMpRzSuTakmh1UugFAa1Bz3QkGF72fBZ9n/7j8a09LJrp/siTx8q1hpiGwv7cnZEeaPTsBPf37cQyHBSdHmlimQLTX04ko1ROtND3OfS2o/l5eDyEOcBnRaDw7Non0DXRDRzm9iXBeHU6RWGHm2ioaYxkRpXhbwcNW5Kc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718804230; c=relaxed/simple; bh=tv/u+vIpgsekf6XIGnQUbeyigJswbZPQMEEJCrbBULM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OxkE8eoby3Ozyh4HMjilTFirteWipfmDxFqzUZXcXK95phGQeD88kHdcMQpNDjkzFUZtj5ZYMbwA4fW1WhopsnMGv+uYJs3GKVzcP4TzL/7WYBPf6jcsJunj0mrMtIgEMQeR/B0f7xMkPh2grmoxxgjilAyC136674c+bgtBcGI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=y1p7bNEC; 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="y1p7bNEC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDAB4C2BBFC; Wed, 19 Jun 2024 13:37:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718804230; bh=tv/u+vIpgsekf6XIGnQUbeyigJswbZPQMEEJCrbBULM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=y1p7bNEC45HTzIGe22sPQpIlKYnMSkUc9Bli5rMOoLdSy0lxi0duY73/BdhcHfJVx /dQXRoph0NMEtHhHlHefWyLPUax6V28i/z3ntgQa7nwe0sADVptOK1TUSfMr2g0BBO iAqh3yCiaqKi+ciN5XFj0F44ttCva78S0V+Vbb8k= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-38539: RDMA/cma: Fix kmemleak in rdma_core observed during blktests nvme/rdma use siw Date: Wed, 19 Jun 2024 15:35:48 +0200 Message-ID: <2024061947-CVE-2024-38539-5ae1@gregkh> X-Mailer: git-send-email 2.45.2 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=3884; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=tv/u+vIpgsekf6XIGnQUbeyigJswbZPQMEEJCrbBULM=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlF9zafvfFd+fGx9C+q2/zcF3xxzJvk9XS3+anWMKOwn kxL1VP+HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCR18kMC04zGsZ+Y64sreha LvtSZK16xFmd+QxzheXX2mbN7mqf6f5r9XermLBXUtusAA== 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: RDMA/cma: Fix kmemleak in rdma_core observed during blktests nvme/rdma use siw When running blktests nvme/rdma, the following kmemleak issue will appear. kmemleak: Kernel memory leak detector initialized (mempool available:36041) kmemleak: Automatic memory scanning thread started kmemleak: 2 new suspected memory leaks (see /sys/kernel/debug/kmemleak) kmemleak: 8 new suspected memory leaks (see /sys/kernel/debug/kmemleak) kmemleak: 17 new suspected memory leaks (see /sys/kernel/debug/kmemleak) kmemleak: 4 new suspected memory leaks (see /sys/kernel/debug/kmemleak) unreferenced object 0xffff88855da53400 (size 192): comm "rdma", pid 10630, jiffies 4296575922 hex dump (first 32 bytes): 37 00 00 00 00 00 00 00 c0 ff ff ff 1f 00 00 00 7............... 10 34 a5 5d 85 88 ff ff 10 34 a5 5d 85 88 ff ff .4.].....4.].... backtrace (crc 47f66721): [] kmalloc_trace+0x30d/0x3b0 [] alloc_gid_entry+0x47/0x380 [ib_core] [] add_modify_gid+0x166/0x930 [ib_core] [] ib_cache_update.part.0+0x6d8/0x910 [ib_core] [] ib_cache_setup_one+0x24a/0x350 [ib_core] [] ib_register_device+0x9e/0x3a0 [ib_core] [] 0xffffffffc2a3d389 [] nldev_newlink+0x2b8/0x520 [ib_core] [] rdma_nl_rcv_msg+0x2c3/0x520 [ib_core] [] rdma_nl_rcv_skb.constprop.0.isra.0+0x23c/0x3a0 [ib_core] [] netlink_unicast+0x445/0x710 [] netlink_sendmsg+0x761/0xc40 [] __sys_sendto+0x3a9/0x420 [] __x64_sys_sendto+0xdc/0x1b0 [] do_syscall_64+0x93/0x180 [] entry_SYSCALL_64_after_hwframe+0x71/0x79 The root cause: rdma_put_gid_attr is not called when sgid_attr is set to ERR_PTR(-ENODEV). The Linux kernel CVE team has assigned CVE-2024-38539 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6 with commit f8ef1be816bf and fixed in 6.6.33 with commit 3eb127dc408b Issue introduced in 6.6 with commit f8ef1be816bf and fixed in 6.8.12 with commit 6564fc181840 Issue introduced in 6.6 with commit f8ef1be816bf and fixed in 6.9.3 with commit b3a7fb93afd8 Issue introduced in 6.6 with commit f8ef1be816bf and fixed in 6.10-rc1 with commit 9c0731832d3b 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-38539 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/infiniband/core/cma.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/3eb127dc408bf7959a4920d04d16ce10e863686a https://git.kernel.org/stable/c/6564fc1818404254d1c9f7d75b403b4941516d26 https://git.kernel.org/stable/c/b3a7fb93afd888793ef226e9665fbda98a95c48e https://git.kernel.org/stable/c/9c0731832d3b7420cbadba6a7f334363bc8dfb15