lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241030183747.0a042cb9@kicinski-fedora-PC1C0HJN>
Date: Wed, 30 Oct 2024 18:37:53 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Juraj Šarinay <juraj@...inay.com>
Cc: netdev@...r.kernel.org, krzk@...nel.org
Subject: Re: [PATCH net-next] net: nfc: Propagate ISO14443 type A target ATS
 to userspace via netlink

On Sun, 27 Oct 2024 15:37:10 +0100 Juraj Šarinay wrote:
> diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h
> index 3a3781838c67..72be94e5ecb1 100644
> --- a/include/net/nfc/nfc.h
> +++ b/include/net/nfc/nfc.h
> @@ -105,6 +105,8 @@ struct nfc_target {
>  	u8 is_iso15693;
>  	u8 iso15693_dsfid;
>  	u8 iso15693_uid[NFC_ISO15693_UID_MAXSIZE];
> +	u8 ats_len;
> +	u8 ats[NFC_ATS_MAXSIZE];

New fields need kdoc:

include/net/nfc/nfc.h:111: warning: Function parameter or struct member 'ats_len' not described in 'nfc_target'
include/net/nfc/nfc.h:111: warning: Function parameter or struct member 'ats' not described in 'nfc_target'

> +	if (ntf->activation_params.nfca_poll_iso_dep.rats_res_len > 0) {
> +		ndev->target_ats_len = ntf->activation_params.nfca_poll_iso_dep.rats_res_len;
> +		memcpy(ndev->target_ats, ntf->activation_params.nfca_poll_iso_dep.rats_res,
> +		       ndev->target_ats_len);

somewhat tangential but does something validate the buffer vs this
length? I see handling in nci_extract_activation_params_iso_dep()
does a min(*data, 20) but there is no buffer length passed in.
Is there a generic length validation somewhere vs the bounds of @data?
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ