From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-172.mta1.migadu.com (out-172.mta1.migadu.com [95.215.58.172]) (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 C9413312822 for ; Mon, 22 Dec 2025 15:22:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766416925; cv=none; b=XoswWCLDAoYRfiIm+463wtpFtoW8R/4G/Y9alL8rjXVBfUvdhhUX852LERgG0VrDg1mwY+Fj6SnqEmlNeUkjz5b5nczfYDecEJ0BmC8YL/cfZtXsrnAWixuLiMCJxB/DrQZwkjvP9WkvMbH7rTOy5pXRdzPaPnZVBbOEQad+jpk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766416925; c=relaxed/simple; bh=rsfsZQFUXvUgzB5b7ipEisB489aciHhgsARMx8BUDXU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=H/5tXNIjhyj2sQGyTDrwGBk+3doeOcxS1IiRq8ktqZQcfx02IBwgMOglLMZF0xZXn8s9AWrgFixSzVRtKntLk4cYQyvq7RoKh09mSMgiLMJ5Cmm+OHtFEpHasV/xT6RD/UCmlektzJxCVQsagqXnjjKIbdoaJE+zn9j69bwD5sg= 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=KyOpUdt2; arc=none smtp.client-ip=95.215.58.172 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="KyOpUdt2" Message-ID: <059d9fbb-7383-441c-9368-1c96eafae1f8@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1766416921; 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=fI5w9UdO/kkIcZxLRIb64c8Q+gNUOfD8NA1o77mtVOo=; b=KyOpUdt2qXZAHwApTZEn+TK7+V5b2/mHxe5pCCZ6m7LYrWZtCgUSL+6Boab2kVZIsSbNst Av7vrU5ixPqFtXolhl6wKxLrxuHGNJaCo/wkP3TSMrAOH+tU7sXEsotNGn9lYoSROvmkJv d8Qm8eR0LuwXI0fMxzPXUFcPGtK1F8k= Date: Mon, 22 Dec 2025 15:21:59 +0000 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] net: nfc: nci: Fix parameter validation for packet data To: Michael Thalmeier , Deepak Sharma , Krzysztof Kozlowski , Simon Horman , Paolo Abeni Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Michael Thalmeier , stable@vger.kernel.org References: <20251222143143.256980-1-michael.thalmeier@hale.at> 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: <20251222143143.256980-1-michael.thalmeier@hale.at> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 22/12/2025 14:31, Michael Thalmeier wrote: > @@ -668,6 +679,11 @@ static int nci_rf_intf_activated_ntf_packet(struct nci_dev *ndev, > } > } > > + if (skb->len < (data - skb->data) + sizeof(ntf.data_exch_rf_tech_and_mode) + > + sizeof(ntf.data_exch_tx_bit_rate) + sizeof (ntf.data_exch_rx_bit_rate) + extra space between sizeof and the bracket > + sizeof(ntf.activation_params_len)) > + return -EINVAL; > + > ntf.data_exch_rf_tech_and_mode = *data++; > ntf.data_exch_tx_bit_rate = *data++; > ntf.data_exch_rx_bit_rate = *data++;