<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/nfc/st21nfca, branch linux-4.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-06-14T14:52:41Z</updated>
<entry>
<title>nfc: st21nfca: fix memory leaks in EVT_TRANSACTION handling</title>
<updated>2022-06-14T14:52:41Z</updated>
<author>
<name>Martin Faltesek</name>
</author>
<published>2022-06-07T02:57:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=593773088d615a46a42c97e01a0550d192bb7f74'/>
<id>urn:sha1:593773088d615a46a42c97e01a0550d192bb7f74</id>
<content type='text'>
commit 996419e0594abb311fb958553809f24f38e7abbe upstream.

Error paths do not free previously allocated memory. Add devm_kfree() to
those failure paths.

Fixes: 26fc6c7f02cb ("NFC: st21nfca: Add HCI transaction event support")
Fixes: 4fbcc1a4cb20 ("nfc: st21nfca: Fix potential buffer overflows in EVT_TRANSACTION")
Cc: stable@vger.kernel.org
Signed-off-by: Martin Faltesek &lt;mfaltesek@google.com&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nfc: st21nfca: fix incorrect validating logic in EVT_TRANSACTION</title>
<updated>2022-06-14T14:52:41Z</updated>
<author>
<name>Martin Faltesek</name>
</author>
<published>2022-06-07T02:57:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e290f91d21ac6fff24f17b2f1fa24ea44b9f9418'/>
<id>urn:sha1:e290f91d21ac6fff24f17b2f1fa24ea44b9f9418</id>
<content type='text'>
commit 77e5fe8f176a525523ae091d6fd0fbb8834c156d upstream.

The first validation check for EVT_TRANSACTION has two different checks
tied together with logical AND. One is a check for minimum packet length,
and the other is for a valid aid_tag. If either condition is true (fails),
then an error should be triggered.  The fix is to change &amp;&amp; to ||.

Fixes: 26fc6c7f02cb ("NFC: st21nfca: Add HCI transaction event support")
Cc: stable@vger.kernel.org
Signed-off-by: Martin Faltesek &lt;mfaltesek@google.com&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nfc: st21nfca: Fix potential buffer overflows in EVT_TRANSACTION</title>
<updated>2022-03-28T06:06:05Z</updated>
<author>
<name>Jordy Zomer</name>
</author>
<published>2022-01-11T16:44:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c1184fa07428fb81371d5863e09795f0d06d35cf'/>
<id>urn:sha1:c1184fa07428fb81371d5863e09795f0d06d35cf</id>
<content type='text'>
commit 4fbcc1a4cb20fe26ad0225679c536c80f1648221 upstream.

It appears that there are some buffer overflows in EVT_TRANSACTION.
This happens because the length parameters that are passed to memcpy
come directly from skb-&gt;data and are not guarded in any way.

Signed-off-by: Jordy Zomer &lt;jordy@pwning.systems&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@canonical.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Denis Efremov &lt;denis.e.efremov@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>NFC: st21nfca: add missed kfree_skb() in an error path</title>
<updated>2020-06-11T07:22:21Z</updated>
<author>
<name>Chuhong Yuan</name>
</author>
<published>2020-05-28T10:20:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=990c16edd260d4f4ddbf55c2ef9158fdb118d360'/>
<id>urn:sha1:990c16edd260d4f4ddbf55c2ef9158fdb118d360</id>
<content type='text'>
[ Upstream commit 3decabdc714ca56c944f4669b4cdec5c2c1cea23 ]

st21nfca_tm_send_atr_res() misses to call kfree_skb() in an error path.
Add the missed function call to fix it.

Fixes: 1892bf844ea0 ("NFC: st21nfca: Adding P2P support to st21nfca in Initiator &amp; Target mode")
Signed-off-by: Chuhong Yuan &lt;hslester96@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>NFC: st21nfca: fix double free</title>
<updated>2019-11-12T18:15:40Z</updated>
<author>
<name>Pan Bian</name>
</author>
<published>2019-11-07T01:33:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=79049c11e38a816c2d620f11e3ad3c6b909907ba'/>
<id>urn:sha1:79049c11e38a816c2d620f11e3ad3c6b909907ba</id>
<content type='text'>
[ Upstream commit 99a8efbb6e30b72ac98cecf81103f847abffb1e5 ]

The variable nfcid_skb is not changed in the callee nfc_hci_get_param()
if error occurs. Consequently, the freed variable nfcid_skb will be
freed again, resulting in a double free bug. Set nfcid_skb to NULL after
releasing it to fix the bug.

Signed-off-by: Pan Bian &lt;bianpan2016@163.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>st21nfca_connectivity_event_received: null check the allocation</title>
<updated>2019-09-06T08:19:32Z</updated>
<author>
<name>Navid Emamdoost</name>
</author>
<published>2019-07-23T22:04:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=69f0dd8bc10f14dbfb76bc54e7dac9daab548a98'/>
<id>urn:sha1:69f0dd8bc10f14dbfb76bc54e7dac9daab548a98</id>
<content type='text'>
[ Upstream commit 9891d06836e67324c9e9c4675ed90fc8b8110034 ]

devm_kzalloc may fail and return null. So the null check is needed.

Signed-off-by: Navid Emamdoost &lt;navid.emamdoost@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>nfc: st21nfca: Remove duplicated ST21NFCA_ESE_HOST_ID from se.c</title>
<updated>2016-05-03T23:40:28Z</updated>
<author>
<name>Christophe Ricard</name>
</author>
<published>2016-04-30T07:12:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99adc394f2a4a16763bccbaa150b9d598b18c58f'/>
<id>urn:sha1:99adc394f2a4a16763bccbaa150b9d598b18c58f</id>
<content type='text'>
ST21NFCA_ESE_HOST_ID is already defined in st21nfca.h.

Signed-off-by: Christophe Ricard &lt;christophe-h.ricard@st.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: st21nfca: Drop two useless checks in ACPI probe path</title>
<updated>2016-05-03T23:36:24Z</updated>
<author>
<name>Christophe Ricard</name>
</author>
<published>2016-04-30T07:12:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=070718a499cea9e6d7e6404788490574dfb71388'/>
<id>urn:sha1:070718a499cea9e6d7e6404788490574dfb71388</id>
<content type='text'>
When st21nfca_hci_i2c_acpi_request_resources() gets called we
already know that the entries in -&gt;acpi_match_table have matched
ACPI ID of the device.
In addition I2C client pointer cannot be NULL in any case
(otherwise I2C core would not call -&gt;probe() for the driver in
the first place).

Drop the two useless checks from the driver.

Signed-off-by: Christophe Ricard &lt;christophe-h.ricard@st.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>nfc: st21nfca: A APDU_READER_GATE pipe is unexpected on a UICC</title>
<updated>2016-05-03T23:33:52Z</updated>
<author>
<name>Christophe Ricard</name>
</author>
<published>2016-04-30T07:12:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7cb6ab590d7d203b53284f4f211d4a8a89a125fc'/>
<id>urn:sha1:7cb6ab590d7d203b53284f4f211d4a8a89a125fc</id>
<content type='text'>
An APDU_READER_GATE pipe is not expected on a UICC. Be more
explicit so that an other secure element form factor (SD card)
does not prompt this message.

Signed-off-by: Christophe Ricard &lt;christophe-h.ricard@st.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>nfc: st21nfca: Simplify white list building</title>
<updated>2016-05-03T23:31:56Z</updated>
<author>
<name>Christophe Ricard</name>
</author>
<published>2016-04-30T07:12:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d35cb20b411673820219e08c57392d18668f6217'/>
<id>urn:sha1:d35cb20b411673820219e08c57392d18668f6217</id>
<content type='text'>
Simplify white list Building

Signed-off-by: Christophe Ricard &lt;christophe-h.ricard@st.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
</feed>
