From mboxrd@z Thu Jan 1 00:00:00 1970 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 8B8DE1E49B; Thu, 13 Jun 2024 12:41:50 +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=1718282510; cv=none; b=dG0g/Z4jvlIFOxIQWYhL5ZbWv8hh+mmXy7svZYPWFzZq1xCXeoiBop8hoUs6tFbKvlr9SMeqsUsrcEfGbwyrznsVz+Lq3H1HCTYxaJ5MOG+WSrcTMRM51Rg7KxXCaasArbx7vrh6iyqI11sjeX6f17kLVB7h6SZTktGZVrqMj5Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718282510; c=relaxed/simple; bh=REAdDuBnSAfxzQo2W7fYDvpgwzmgJldrHFX+QDzq8II=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Hg3raq3VNe6yX7QMqkTmu7SgVUP0U7Ja3qg2p7x88b4+fuqmtagoyIaJDj7nCyDduXoabOOqGA4RktSLlGFR+k/1uj2z82kyrmwBq3tlVxwDSO5f+7YgDs6a87r6zoRxEdnfvNc9KFmBZZ36jnf2dVS3UyBv6w7nDcMel47qJ9A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ue6jbncn; 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="Ue6jbncn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3C0CC2BBFC; Thu, 13 Jun 2024 12:41:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718282510; bh=REAdDuBnSAfxzQo2W7fYDvpgwzmgJldrHFX+QDzq8II=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ue6jbncnEoEvE3+GqiSV++2FbK12NUqfDUng/qpZ9M3D5BSJvb4lhOw9I7YOjeIqg 2+VezPE+AVzpoLsXuF9XVOZbG5YfTF/1gBZwHP+H84glSUcglLHl9EL0nUHq7d3GrI uJWfEhiUiAa2QFiZAPyeAytRR4XYz6REUio5JO4g= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, syzbot , Andrey Konovalov , Tetsuo Handa , Krzysztof Kozlowski , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 301/402] nfc: nci: Fix kcov check in nci_rx_work() Date: Thu, 13 Jun 2024 13:34:18 +0200 Message-ID: <20240613113313.883961854@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240613113302.116811394@linuxfoundation.org> References: <20240613113302.116811394@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tetsuo Handa [ Upstream commit 19e35f24750ddf860c51e51c68cf07ea181b4881 ] Commit 7e8cdc97148c ("nfc: Add KCOV annotations") added kcov_remote_start_common()/kcov_remote_stop() pair into nci_rx_work(), with an assumption that kcov_remote_stop() is called upon continue of the for loop. But commit d24b03535e5e ("nfc: nci: Fix uninit-value in nci_dev_up and nci_ntf_packet") forgot to call kcov_remote_stop() before break of the for loop. Reported-by: syzbot Closes: https://syzkaller.appspot.com/bug?extid=0438378d6f157baae1a2 Fixes: d24b03535e5e ("nfc: nci: Fix uninit-value in nci_dev_up and nci_ntf_packet") Suggested-by: Andrey Konovalov Signed-off-by: Tetsuo Handa Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/6d10f829-5a0c-405a-b39a-d7266f3a1a0b@I-love.SAKURA.ne.jp Signed-off-by: Jakub Kicinski Stable-dep-of: 6671e352497c ("nfc: nci: Fix handling of zero-length payload packets in nci_rx_work()") Signed-off-by: Sasha Levin --- net/nfc/nci/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c index 64c87b43035da..a32e49278a3f4 100644 --- a/net/nfc/nci/core.c +++ b/net/nfc/nci/core.c @@ -1531,6 +1531,7 @@ static void nci_rx_work(struct work_struct *work) if (!nci_valid_size(skb)) { kfree_skb(skb); + kcov_remote_stop(); break; } -- 2.43.0