From nobody Thu Apr 9 12:49:12 2026 Received: from mail-oo1-f72.google.com (mail-oo1-f72.google.com [209.85.161.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FE1F2010EE for ; Mon, 9 Mar 2026 04:56:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773032210; cv=none; b=dk1rnnaf3MbZk3ILy+MgjMx929ZgFUmiQNho3kX+pGDjJXAkOfCZUG7cveNDpL6RoD44r6SG5gvUvuDoIwo16LYEaErR483ipyzZopEys20V4ikHJODQSTVNscetdQy9wpdw3ckb8C5X1aH5j6d0eVmuDGi2kTUzw+oThOaqnQA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773032210; c=relaxed/simple; bh=4exwv23/tCuWFh+EWQyVautjFjO2IFTCHkCeauT+rg4=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=gVTjNqsK4TuiUMeznyk9hTy3gZxZzaIsvIEojhKGa2Jv4Ah744kf2v+4UgSwkqg8I3p+OH0dHMDGRTlT9MHGRnDfz5gZ5S8yHx6o83DoZurWkRkVLNgCK5Rm0iMmefp/z0QdOY0kIsX7ERrwY2hMs74LqpQZLWEqXW7yc5E2HPU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.161.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oo1-f72.google.com with SMTP id 006d021491bc7-67a1e063795so53179317eaf.1 for ; Sun, 08 Mar 2026 21:56:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773032208; x=1773637008; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=upvSevd+Ay2oP6r/BLk3b54azT/WtIzS5SBOmidiPfE=; b=PVB3QxtK8hYnOuhOyuUTsOz4nsxWRtsmQ6BOLt3uxndG6XGvpHFIm/+NwEOppXgClg ItxX157grXTLMzLxAxzeFc/0nUo6o+CmC2xhzS6khqI+gFyMUPgRe4qoPAyrNq3Z1DQP L/EIcGCt56ePAez+XeSilTbcQUeJtezLw2MwVqmubg1yjFhfQAjFj1cRnqPOn94fx0cE NnDYktA3zdXV38q89+nX1BZMY3oCFdXoy5yOwxkmSaBSxJYoqPv1Sx7mc7272QkHEmPr GI/0RfUX/bwayK9km1n0vh/qWKeHkOFtXexzMAIprfzUbmsAczVuCJKS2LDiHDaCkkVY cj9A== X-Gm-Message-State: AOJu0YxWHUtvMjI+13sh8gye/S/mzoiIH84qK6yPkVEz0TWX9cRiAGI7 ymmyoY+T1DX9IPeqT3dPZiOtf4XHfg2/FVoDZ6/h9SAdnby3FdDQZfjjPGgYO7r6HMIoZ6cIdo9 EV5xilhEmdmWaxAKE0nbyyPp9GsUziJrZgEJ1MOSGpqO7Yi7cfPuU17Ec7VI= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6820:f004:b0:67b:b4dc:c6ed with SMTP id 006d021491bc7-67bb4dcc721mr1029503eaf.9.1773032207964; Sun, 08 Mar 2026 21:56:47 -0700 (PDT) Date: Sun, 08 Mar 2026 21:56:47 -0700 In-Reply-To: <69ad7ccb.a00a0220.b130.0003.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69ae530f.050a0220.310d8.0015.GAE@google.com> Subject: Forwarded: [PATCH] atm: lec: fix use-after-free in send_to_lecd From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: [PATCH] atm: lec: fix use-after-free in send_to_lecd Author: kartikey406@gmail.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git= master In send_to_lecd(), the socket is extracted via sk_atm(priv->lecd) without holding a reference. The APIC timer triggers a softirq which runs RCU callbacks, and if the RCU grace period has elapsed, the socket can be freed via rcu_do_batch() while send_to_lecd() is still accessing it, triggering a use-after-free bug. Fix this by adding sock_hold() before accessing the socket and sock_put() after all usage is done to prevent premature freeing. Reported-by: syzbot+f50072212ab792c86925@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=3Df50072212ab792c86925 Signed-off-by: Deepanshu Kartikey --- net/atm/lec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/atm/lec.c b/net/atm/lec.c index fb93c6e1c329..4e752b4b623e 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c @@ -534,9 +534,9 @@ send_to_lecd(struct lec_priv *priv, atmlec_msg_type typ= e, =20 atm_force_charge(priv->lecd, skb->truesize); sk =3D sk_atm(priv->lecd); + sock_hold(sk); skb_queue_tail(&sk->sk_receive_queue, skb); sk->sk_data_ready(sk); - if (data !=3D NULL) { pr_debug("about to send %d bytes of data\n", data->len); atm_force_charge(priv->lecd, data->truesize); @@ -544,6 +544,7 @@ send_to_lecd(struct lec_priv *priv, atmlec_msg_type typ= e, sk->sk_data_ready(sk); } =20 + sock_put(sk); return 0; } =20 --=20 2.43.0