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-next>] [day] [month] [year] [list]
Date:	Sat, 28 Feb 2015 16:41:39 +0800
From:	Nicolas Iooss <nicolas.iooss_linux@....org>
To:	Christophe Ricard <christophe.ricard@...il.com>,
	Samuel Ortiz <sameo@...ux.intel.com>
CC:	linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Invalid assignment to gate in st21nfca_get_iso14443_3_uid

Hello,

While compiling Linux with -Wunused-but-set-parameter, gcc reported a
warning in st21nfca_get_iso14443_3_uid function, about "gate" being set
but not used [1].  By looking at the code, it is clear that "gate =
uid_skb->data;" does nothing useful.  The function is only called once,
by st21nfca_hci_target_from_gate [2], which uses the content of the uid
array which is NOT initialized by st21nfca_get_iso14443_3_uid as the
source of a memcpy [3].

My understanding of the code is that "gate = uid_skb->data;" in
st21nfca_get_iso14443_3_uid should be changed to "memcpy(gate,
uid_skb->data, uid_skb->len);".

I'm new to the NFC subsystem so I can be wrong, in which case please
tell me what I missed in my analysis.  Please Cc me when replying as I
am not subscribed to the mailing lists.

Thanks,

Nicolas


[1]
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/nfc/st21nfca/st21nfca.c?id=v4.0-rc1#n575
[2]
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/nfc/st21nfca/st21nfca.c?id=v4.0-rc1#n646
[3]
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/nfc/st21nfca/st21nfca.c?id=v4.0-rc1#n682
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ