From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 C488A2253FC for ; Tue, 30 Sep 2025 14:31:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759242670; cv=none; b=hk59lNYLuM+ke4WVpgWXm44m5DCY6pDvdPz2ZI7YIyR4q/QE50ej5UjWhRSD56Cir8DHDfG0hcEiAFLJdng//CpUeSTOctd/3o5Fxbrbtf3Lvdg5YSmBQcyjIqF6nlPsPUK5yvT+QJWuR3fL4Q9rNEsvwWzAqNbRrKeFUzyP7SY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759242670; c=relaxed/simple; bh=TxtdYZk9dsFJydGVO6ymBCi05gQcE0LcJqQYcYklqBA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=islQIAAZ374xqDEeoMMjiJiaJgwP1wGYMChOrMkQDbb/FfS9TEz5BIopybu1350Zc037lEkMBYsonNesowkfS2pYyBlAjO1pjX2qoXsDmbOykjkHNknhCh06YZML3lgHntnTIqKmLfgna//RnaeKh27GrqAGh3Uy4/kv5+CFgfg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=XoE5x3ww; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XoE5x3ww" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1759242667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KiimNVQCGI88ieZh8p4IJZ/Sr9pCyj861BQTbYqy/Tk=; b=XoE5x3wwTJGFK9OmUiOuYkn9xmyE4GBO5GtZkZBZ4X3VHJ7/lYB6CDlb995F76IbtOiOEf s1guHuB4HRYXG163indjZUp6Fc9Uy0uyjZmmO0wK9Vdr5Nxfi71YOtNa4uI5cxKtDbFiiu v970KMCSXfnRR6Fayq+jBKXZ6lFyHv8= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-63-4IxxznzeOOybS9KPpf-ciw-1; Tue, 30 Sep 2025 10:31:06 -0400 X-MC-Unique: 4IxxznzeOOybS9KPpf-ciw-1 X-Mimecast-MFC-AGG-ID: 4IxxznzeOOybS9KPpf-ciw_1759242665 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-46e3a049abaso29875975e9.0 for ; Tue, 30 Sep 2025 07:31:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759242665; x=1759847465; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KiimNVQCGI88ieZh8p4IJZ/Sr9pCyj861BQTbYqy/Tk=; b=a4d2tVzeVCouzkgIhbvVesZnh4ZNvE6S0kYKjUabCdRO6nfsXnd9t2PVLtvP7bxmEI BS6vP6KQSAOsvZdv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-46e6120218cmr1302085e9.8.1759242664804; Tue, 30 Sep 2025 07:31:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFVjdt+VONnfPWja9/VsLbNc3mnehERm9krtPABV0fyuDy+ajxw8o2r9+1p0b6nLCu4FSG8KQ== X-Received: by 2002:a05:600c:8b55:b0:46e:45ff:5bdb with SMTP id 5b1f17b1804b1-46e6120218cmr1301575e9.8.1759242664074; Tue, 30 Sep 2025 07:31:04 -0700 (PDT) Received: from ?IPV6:2a0d:3344:2712:7e10:4d59:d956:544f:d65c? ([2a0d:3344:2712:7e10:4d59:d956:544f:d65c]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-46e56f3dc27sm68198535e9.5.2025.09.30.07.31.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Sep 2025 07:31:03 -0700 (PDT) Message-ID: <377697dd-15bc-4a2d-be19-1d136adb351c@redhat.com> Date: Tue, 30 Sep 2025 16:31:02 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net v2] atm: Fix the cleanup on alloc_mpc failure in atm_mpoa_mpoad_attach To: Deepak Sharma Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, horms@kernel.org, pwn9uin@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linux.dev, david.hunter.linux@gmail.com, skhan@linuxfoundation.org, syzbot+740e04c2a93467a0f8c8@syzkaller.appspotmail.com, syzbot+07b635b9c111c566af8b@syzkaller.appspotmail.com References: <20250925204251.232473-1-deepak.sharma.472935@gmail.com> <54234daf-ace1-4369-baea-eab94fcea74b@redhat.com> Content-Language: en-US From: Paolo Abeni In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 9/30/25 3:33 PM, Deepak Sharma wrote: > On Tue, Sep 30, 2025 at 2:15 PM Paolo Abeni wrote: >> AFAICS the mpc_timer can rearm itself, so this the above is not enough >> and you should use timer_shutdown_sync() instead. > > Hi, > > As I understand it, `timer_shutdown_sync` will prevent any further > re-arming of the timer. I think this is not what we want here; since even if > we somehow fail to allocate our first MPOA client object on our first > ioctl call, > and hence end up wanting to disarm the timer, maybe on next call we can > allocate it successfully, and we would want that caches are processed > (which are processed for every time out). So we still want it to be > possible that > we can re-arm it. Ah, I missed the goal here is just being able to rearm the timer (i.e. there is no related UaF). Given the above, I think you could instead simply replace add_timer() with mod_timer(). /P