From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-185.mta0.migadu.com (out-185.mta0.migadu.com [91.218.175.185]) (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 B02DF3EDE5C for ; Thu, 9 Jul 2026 09:29:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.185 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783589399; cv=none; b=f0W1J+0880hpeIKAPGucqoxuQ8a59it1Tmf6u8+iDX+pHDkP01hdDgQnO7GGA6faeTeu/zZ1CTD+Y6TjfHQ1FFjRV2T/Aq7ZYKPx2waA285vZGutYIqZuGVV3po860yV0aIBux7UMK0ZrKNG/2OVCtvtzExOggzoXMnsz2pAhdw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783589399; c=relaxed/simple; bh=WcLpTNgXteV+1I3Yv9kbxguCi72yncRISpDGfUY2+Zc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Q40TteTWJFyLPDkOg5vA2SbavfQfexN8UIyslEBqRO9j9fcsVRkRM7Cy/T2kIFHIwYMBixYZ72sna9ukinaRYLX3adRLr14kOmroave7ZzrQ/UDK5cAqsRNV5+WftkH5KOYdGdF8ycMEPNPSv4RGhG5r52bGIkrjEuY4ExT4Izg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=Jlw+qUrd; arc=none smtp.client-ip=91.218.175.185 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Jlw+qUrd" Message-ID: <9e1d71b5-f3c8-4b96-a2e0-cc83ef7f38cf@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1783589395; 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=ZvVJY+QMF/10NBIDrBLoXoGcw1iTZ414fZExGXzKIik=; b=Jlw+qUrdLHKd4Zp4rJN9eDyWpQUMcUc5okjOIVPgCjKe9MyZVTFw/bKC5dXtgcpueoOp0+ JQSr9FIwhqJT7VjoOlhAW3RJEgVnwNSglN3pr18A5HTxEbjBXEmhVa4KAIgCAbZ4/PhrLq bQTeAcqzZeTTB9aNNre9BZnVfTCo9tA= Date: Thu, 9 Jul 2026 10:29:46 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH net v3] tipc: fix u16 MTU truncation in media and bearer MTU validation To: "Cen Zhang (Microsoft)" Cc: AutonomousCodeSecurity@microsoft.com, davem@davemloft.net, edumazet@google.com, horms@kernel.org, jmaloy@redhat.com, kuba@kernel.org, kys@microsoft.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, tgopinath@linux.microsoft.com, tipc-discussion@lists.sourceforge.net, tung.quang.nguyen@est.tech References: <7a6d7de8-7c33-42fd-a0f3-68bc1911b0e5@linux.dev> <20260708224129.3722-1-blbllhy@gmail.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20260708224129.3722-1-blbllhy@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 08/07/2026 23:41, Cen Zhang (Microsoft) wrote: > Sadly NLA_POLICY_MAX() cannot be used here -- its .max field > is s16 instead of u16 in struct nla_policy, which will > overflow to -1 during my testing. > > Please let me know if we have any other better choices. > Otherwise, I'll prepare a patch adding .min check ( > TIPC_MIN_BEARER_MTU). Ah, yeah, you are right, let's keep full range check