<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/crypto/chelsio/chtls, branch linux-5.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-12-08T09:42:03Z</updated>
<entry>
<title>chelsio/chtls: fix a double free in chtls_setkey()</title>
<updated>2020-12-08T09:42:03Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2020-12-03T08:44:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2f8a3f6b2d4bf255b3852beda8561a1e76fc2d22'/>
<id>urn:sha1:2f8a3f6b2d4bf255b3852beda8561a1e76fc2d22</id>
<content type='text'>
[ Upstream commit 391119fb5c5c4bdb4d57c7ffeb5e8d18560783d1 ]

The "skb" is freed by the transmit code in cxgb4_ofld_send() and we
shouldn't use it again.  But in the current code, if we hit an error
later on in the function then the clean up code will call kfree_skb(skb)
and so it causes a double free.

Set the "skb" to NULL and that makes the kfree_skb() a no-op.

Fixes: d25f2f71f653 ("crypto: chtls - Program the TLS session Key")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Link: https://lore.kernel.org/r/X8ilb6PtBRLWiSHp@mwanda
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>chelsio/chtls: fix panic during unload reload chtls</title>
<updated>2020-12-08T09:42:01Z</updated>
<author>
<name>Vinay Kumar Yadav</name>
</author>
<published>2020-11-25T21:49:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a0a5d6881a0dfb3e2d386ef00447107f37e489a'/>
<id>urn:sha1:5a0a5d6881a0dfb3e2d386ef00447107f37e489a</id>
<content type='text'>
[ Upstream commit e3d5e971d2f83d8ddd4b91a50cea4517fb488383 ]

there is kernel panic in inet_twsk_free() while chtls
module unload when socket is in TIME_WAIT state because
sk_prot_creator was not preserved on connection socket.

Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition")
Signed-off-by: Udai Sharma &lt;udai.sharma@chelsio.com&gt;
Signed-off-by: Vinay Kumar Yadav &lt;vinay.yadav@chelsio.com&gt;
Link: https://lore.kernel.org/r/20201125214913.16938-1-vinay.yadav@chelsio.com
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>chelsio/chtls: fix always leaking ctrl_skb</title>
<updated>2020-11-10T11:38:56Z</updated>
<author>
<name>Vinay Kumar Yadav</name>
</author>
<published>2020-11-02T17:39:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b18ec4a9634d510bf70df3393ec27e1b52ca5329'/>
<id>urn:sha1:b18ec4a9634d510bf70df3393ec27e1b52ca5329</id>
<content type='text'>
[ Upstream commit dbfe394dad33f99cf8458be50483ec40a5d29c34 ]

Correct skb refcount in alloc_ctrl_skb(), causing skb memleak
when chtls_send_abort() called with NULL skb.
it was always leaking the skb, correct it by incrementing skb
refs by one.

Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition")
Signed-off-by: Vinay Kumar Yadav &lt;vinay.yadav@chelsio.com&gt;
Link: https://lore.kernel.org/r/20201102173909.24826-1-vinay.yadav@chelsio.com
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>chelsio/chtls: fix memory leaks caused by a race</title>
<updated>2020-11-10T11:38:56Z</updated>
<author>
<name>Vinay Kumar Yadav</name>
</author>
<published>2020-11-02T17:36:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d38c4b58aaa78f475d88ece4199472c9008ebc1c'/>
<id>urn:sha1:d38c4b58aaa78f475d88ece4199472c9008ebc1c</id>
<content type='text'>
[ Upstream commit 8080b462b6aa856ae05ea010441a702599e579f2 ]

race between user context and softirq causing memleak,
consider the call sequence scenario

chtls_setkey()         //user context
chtls_peer_close()
chtls_abort_req_rss()
chtls_setkey()         //user context

work request skb queued in chtls_setkey() won't be freed
because resources are already cleaned for this connection,
fix it by not queuing work request while socket is closing.

v1-&gt;v2:
- fix W=1 warning.

v2-&gt;v3:
- separate it out from another memleak fix.

Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition")
Signed-off-by: Vinay Kumar Yadav &lt;vinay.yadav@chelsio.com&gt;
Link: https://lore.kernel.org/r/20201102173650.24754-1-vinay.yadav@chelsio.com
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>chelsio/chtls: fix tls record info to user</title>
<updated>2020-11-01T11:47:05Z</updated>
<author>
<name>Vinay Kumar Yadav</name>
</author>
<published>2020-10-22T19:05:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=676a2b8478ea04cfa38cddd5dff8981098ace06f'/>
<id>urn:sha1:676a2b8478ea04cfa38cddd5dff8981098ace06f</id>
<content type='text'>
[ Upstream commit 4f3391ce8f5a69e7e6d66d0a3fc654eb6dbdc919 ]

chtls_pt_recvmsg() receives a skb with tls header and subsequent
skb with data, need to finalize the data copy whenever next skb
with tls header is available. but here current tls header is
overwritten by next available tls header, ends up corrupting
user buffer data. fixing it by finalizing current record whenever
next skb contains tls header.

v1-&gt;v2:
- Improved commit message.

Fixes: 17a7d24aa89d ("crypto: chtls - generic handling of data and hdr")
Signed-off-by: Vinay Kumar Yadav &lt;vinay.yadav@chelsio.com&gt;
Link: https://lore.kernel.org/r/20201022190556.21308-1-vinay.yadav@chelsio.com
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>chelsio/chtls: fix memory leaks in CPL handlers</title>
<updated>2020-11-01T11:47:04Z</updated>
<author>
<name>Vinay Kumar Yadav</name>
</author>
<published>2020-10-25T19:42:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a368a6efeeb0e06cb98010f12127e9584faaa95b'/>
<id>urn:sha1:a368a6efeeb0e06cb98010f12127e9584faaa95b</id>
<content type='text'>
[ Upstream commit 6daa1da4e262b0cd52ef0acc1989ff22b5540264 ]

CPL handler functions chtls_pass_open_rpl() and
chtls_close_listsrv_rpl() should return CPL_RET_BUF_DONE
so that caller function will do skb free to avoid leak.

Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition")
Signed-off-by: Vinay Kumar Yadav &lt;vinay.yadav@chelsio.com&gt;
Link: https://lore.kernel.org/r/20201025194228.31271-1-vinay.yadav@chelsio.com
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>chelsio/chtls: fix deadlock issue</title>
<updated>2020-11-01T11:47:04Z</updated>
<author>
<name>Vinay Kumar Yadav</name>
</author>
<published>2020-10-25T19:35:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6e3163c742580630cf8bba172ef84c3a5f2a9295'/>
<id>urn:sha1:6e3163c742580630cf8bba172ef84c3a5f2a9295</id>
<content type='text'>
[ Upstream commit 28e9dcd9172028263c8225c15c4e329e08475e89 ]

In chtls_pass_establish() we hold child socket lock using bh_lock_sock
and we are again trying bh_lock_sock in add_to_reap_list, causing deadlock.
Remove bh_lock_sock in add_to_reap_list() as lock is already held.

Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition")
Signed-off-by: Vinay Kumar Yadav &lt;vinay.yadav@chelsio.com&gt;
Link: https://lore.kernel.org/r/20201025193538.31112-1-vinay.yadav@chelsio.com
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>chelsio/chtls: fix writing freed memory</title>
<updated>2020-10-29T09:10:53Z</updated>
<author>
<name>Vinay Kumar Yadav</name>
</author>
<published>2020-10-19T11:50:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=54106218f14bc0da813a84dfb21b686c4d1408cd'/>
<id>urn:sha1:54106218f14bc0da813a84dfb21b686c4d1408cd</id>
<content type='text'>
[ Upstream commit da1a039bcf293e4699d413c9f65d975da2d7c0bd ]

When chtls_sock *csk is freed, same memory can be allocated
to different csk in chtls_sock_create().
csk-&gt;cdev = NULL; statement might ends up modifying wrong
csk, eventually causing kernel panic.
removing (csk-&gt;cdev = NULL) statement as it is not required.

Fixes: 3a0a97838923 ("crypto/chtls: Fix chtls crash in connection cleanup")
Signed-off-by: Vinay Kumar Yadav &lt;vinay.yadav@chelsio.com&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>chelsio/chtls: correct function return and return type</title>
<updated>2020-10-29T09:10:53Z</updated>
<author>
<name>Vinay Kumar Yadav</name>
</author>
<published>2020-10-19T11:50:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=91b307232e316abc47dadb35384547f2bd4103a3'/>
<id>urn:sha1:91b307232e316abc47dadb35384547f2bd4103a3</id>
<content type='text'>
[ Upstream commit 8580a61aede28d441e1c80588803411ee86aa299 ]

csk_mem_free() should return true if send buffer is available,
false otherwise.

Fixes: 3b8305f5c844 ("crypto: chtls - wait for memory sendmsg, sendpage")
Signed-off-by: Vinay Kumar Yadav &lt;vinay.yadav@chelsio.com&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>chelsio/chtls: Fix panic when listen on multiadapter</title>
<updated>2020-10-29T09:10:53Z</updated>
<author>
<name>Vinay Kumar Yadav</name>
</author>
<published>2020-10-19T11:50:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c5a6bb67675a08ded60471e4ceef59b9a6642f3a'/>
<id>urn:sha1:c5a6bb67675a08ded60471e4ceef59b9a6642f3a</id>
<content type='text'>
[ Upstream commit 9819f22c410b4bf6589d3126e8bc3952db507cbf ]

Add the logic to compare net_device returned by ip_dev_find()
with the net_device list in cdev-&gt;ports[] array and return
net_device if matched else NULL.

Fixes: 6abde0b24122 ("crypto/chtls: IPv6 support for inline TLS")
Signed-off-by: Venkatesh Ellapu &lt;venkatesh.e@chelsio.com&gt;
Signed-off-by: Vinay Kumar Yadav &lt;vinay.yadav@chelsio.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
