<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/net, branch v2020.01-rc2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>net: nfs: remove superfluous packed attribute</title>
<updated>2019-09-04T16:37:19+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2019-09-02T22:05:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5a5d1def59024dd3225e2a6142f8ee3ee10180a8'/>
<id>5a5d1def59024dd3225e2a6142f8ee3ee10180a8</id>
<content type='text'>
With GCC 9.2.1 net/nfs.c leads to multiple errors of type
address-of-packed-member.

net/nfs.c: In function ‘rpc_req’:
net/nfs.c:199:18: error: taking address of packed member of
‘struct rpc_t’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
  199 |  p = (uint32_t *)&amp;(rpc_pkt.u.call.data);
      |                  ^~~~~~~~~~~~~~~~~~~~~~
net/nfs.c: In function ‘nfs_readlink_reply’:
net/nfs.c:631:46: error: taking address of packed member of
‘struct rpc_t’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
  631 |    nfs3_get_attributes_offset(rpc_pkt.u.reply.data);
      |                               ~~~~~~~~~~~~~~~^~~~~
  LD      drivers/block/built-in.o
net/nfs.c: In function ‘nfs_read_reply’:
net/nfs.c:692:46: error: taking address of packed member of
‘struct rpc_t’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
  692 |    nfs3_get_attributes_offset(rpc_pkt.u.reply.data);
      |                               ~~~~~~~~~~~~~~~^~~~~

struct rpc_t is only used as local variable. It is naturally packed. So
there is no need for the attribute packed.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With GCC 9.2.1 net/nfs.c leads to multiple errors of type
address-of-packed-member.

net/nfs.c: In function ‘rpc_req’:
net/nfs.c:199:18: error: taking address of packed member of
‘struct rpc_t’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
  199 |  p = (uint32_t *)&amp;(rpc_pkt.u.call.data);
      |                  ^~~~~~~~~~~~~~~~~~~~~~
net/nfs.c: In function ‘nfs_readlink_reply’:
net/nfs.c:631:46: error: taking address of packed member of
‘struct rpc_t’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
  631 |    nfs3_get_attributes_offset(rpc_pkt.u.reply.data);
      |                               ~~~~~~~~~~~~~~~^~~~~
  LD      drivers/block/built-in.o
net/nfs.c: In function ‘nfs_read_reply’:
net/nfs.c:692:46: error: taking address of packed member of
‘struct rpc_t’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
  692 |    nfs3_get_attributes_offset(rpc_pkt.u.reply.data);
      |                               ~~~~~~~~~~~~~~~^~~~~

struct rpc_t is only used as local variable. It is naturally packed. So
there is no need for the attribute packed.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: nfs: remove superfluous conversions</title>
<updated>2019-09-04T16:37:19+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2019-09-02T21:55:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=15eea9a1a8166b4bbab6c02cc426a7cc806ea2ca'/>
<id>15eea9a1a8166b4bbab6c02cc426a7cc806ea2ca</id>
<content type='text'>
rpc_pkt.u.call.data is an array of uint32_t. There is no need to convert
it to uint32_t *.

memcpy() expects void * as it 1st and 2nd argument. There is no point in
converting pointers to char * before passing them to memcpy().

In ntohl(data[1]) != 0 calling ntohl() is superfluous. If the value is
zero, does not depend on the byte order.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rpc_pkt.u.call.data is an array of uint32_t. There is no need to convert
it to uint32_t *.

memcpy() expects void * as it 1st and 2nd argument. There is no point in
converting pointers to char * before passing them to memcpy().

In ntohl(data[1]) != 0 calling ntohl() is superfluous. If the value is
zero, does not depend on the byte order.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CVE-2019-14196: nfs: fix unbounded memcpy with a failed length check at nfs_lookup_reply</title>
<updated>2019-09-04T16:37:19+00:00</updated>
<author>
<name>liucheng (G)</name>
<email>liucheng32@huawei.com</email>
</author>
<published>2019-08-29T13:48:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5d14ee4e53a81055d34ba280cb8fd90330f22a96'/>
<id>5d14ee4e53a81055d34ba280cb8fd90330f22a96</id>
<content type='text'>
This patch adds a check to rpc_pkt.u.reply.data at nfs_lookup_reply.

Signed-off-by: Cheng Liu &lt;liucheng32@huawei.com&gt;
Reported-by: Fermín Serna &lt;fermin@semmle.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a check to rpc_pkt.u.reply.data at nfs_lookup_reply.

Signed-off-by: Cheng Liu &lt;liucheng32@huawei.com&gt;
Reported-by: Fermín Serna &lt;fermin@semmle.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CVE-2019-14195: nfs: fix unbounded memcpy with unvalidated length at nfs_readlink_reply</title>
<updated>2019-09-04T16:37:19+00:00</updated>
<author>
<name>liucheng (G)</name>
<email>liucheng32@huawei.com</email>
</author>
<published>2019-08-29T13:47:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=cf3a4f1e86ecdd24f87b615051b49d8e1968c230'/>
<id>cf3a4f1e86ecdd24f87b615051b49d8e1968c230</id>
<content type='text'>
This patch adds a check to rpc_pkt.u.reply.data at nfs_readlink_reply.

Signed-off-by: Cheng Liu &lt;liucheng32@huawei.com&gt;
Reported-by: Fermín Serna &lt;fermin@semmle.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a check to rpc_pkt.u.reply.data at nfs_readlink_reply.

Signed-off-by: Cheng Liu &lt;liucheng32@huawei.com&gt;
Reported-by: Fermín Serna &lt;fermin@semmle.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CVE-2019-14194/CVE-2019-14198: nfs: fix unbounded memcpy with a failed length check at nfs_read_reply</title>
<updated>2019-09-04T16:37:19+00:00</updated>
<author>
<name>liucheng (G)</name>
<email>liucheng32@huawei.com</email>
</author>
<published>2019-08-29T13:47:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=aa207cf3a6d68f39d64cd29057a4fb63943e9078'/>
<id>aa207cf3a6d68f39d64cd29057a4fb63943e9078</id>
<content type='text'>
This patch adds a check to rpc_pkt.u.reply.data at nfs_read_reply.

Signed-off-by: Cheng Liu &lt;liucheng32@huawei.com&gt;
Reported-by: Fermín Serna &lt;fermin@semmle.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a check to rpc_pkt.u.reply.data at nfs_read_reply.

Signed-off-by: Cheng Liu &lt;liucheng32@huawei.com&gt;
Reported-by: Fermín Serna &lt;fermin@semmle.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CVE: nfs: fix stack-based buffer overflow in some nfs_handler reply helper functions</title>
<updated>2019-09-04T16:37:19+00:00</updated>
<author>
<name>liucheng (G)</name>
<email>liucheng32@huawei.com</email>
</author>
<published>2019-08-29T13:47:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=741a8a08ebe5bc3ccfe3cde6c2b44ee53891af21'/>
<id>741a8a08ebe5bc3ccfe3cde6c2b44ee53891af21</id>
<content type='text'>
This patch adds a check to nfs_handler to fix buffer overflow for CVE-2019-14197,
CVE-2019-14200, CVE-2019-14201, CVE-2019-14202, CVE-2019-14203 and CVE-2019-14204.

Signed-off-by: Cheng Liu &lt;liucheng32@huawei.com&gt;
Reported-by: Fermín Serna &lt;fermin@semmle.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a check to nfs_handler to fix buffer overflow for CVE-2019-14197,
CVE-2019-14200, CVE-2019-14201, CVE-2019-14202, CVE-2019-14203 and CVE-2019-14204.

Signed-off-by: Cheng Liu &lt;liucheng32@huawei.com&gt;
Reported-by: Fermín Serna &lt;fermin@semmle.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CVE: net: fix unbounded memcpy of UDP packet</title>
<updated>2019-09-04T16:37:19+00:00</updated>
<author>
<name>liucheng (G)</name>
<email>liucheng32@huawei.com</email>
</author>
<published>2019-08-29T13:47:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fe7288069d2e6659117049f7d27e261b550bb725'/>
<id>fe7288069d2e6659117049f7d27e261b550bb725</id>
<content type='text'>
This patch adds a check to udp_len to fix unbounded memcpy for
CVE-2019-14192, CVE-2019-14193 and CVE-2019-14199.

Signed-off-by: Cheng Liu &lt;liucheng32@huawei.com&gt;
Reviewed-by: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
Reported-by: Fermín Serna &lt;fermin@semmle.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a check to udp_len to fix unbounded memcpy for
CVE-2019-14192, CVE-2019-14193 and CVE-2019-14199.

Signed-off-by: Cheng Liu &lt;liucheng32@huawei.com&gt;
Reviewed-by: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
Reported-by: Fermín Serna &lt;fermin@semmle.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: mdio-uclass: name MDIO according to device-name property if preset</title>
<updated>2019-09-04T16:37:19+00:00</updated>
<author>
<name>Alex Marginean</name>
<email>alexandru.marginean@nxp.com</email>
</author>
<published>2019-07-25T09:33:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6b3abc048228bb4336dd0cc761993353a4efb206'/>
<id>6b3abc048228bb4336dd0cc761993353a4efb206</id>
<content type='text'>
Use the optional property device-name to name the MDIO bus.  This works
around limitations with using the DT node name on devices such as
Armada-8040, which integrates two cp100 cores, both featuring MDIOs at the
same relative offsets and with the same DT node names.
The concept was originally proposed by Marvell as a custom property called
mdio-name specific to Marvell driver.  This patch uses the more generic
property device-name and moves this into MDIO class code so other can use
it as well.

Signed-off-by: Alex Marginean &lt;alexm.osslist@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the optional property device-name to name the MDIO bus.  This works
around limitations with using the DT node name on devices such as
Armada-8040, which integrates two cp100 cores, both featuring MDIOs at the
same relative offsets and with the same DT node names.
The concept was originally proposed by Marvell as a custom property called
mdio-name specific to Marvell driver.  This patch uses the more generic
property device-name and moves this into MDIO class code so other can use
it as well.

Signed-off-by: Alex Marginean &lt;alexm.osslist@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: introduce packet capture support</title>
<updated>2019-09-04T16:37:19+00:00</updated>
<author>
<name>Ramon Fried</name>
<email>rfried.dev@gmail.com</email>
</author>
<published>2019-07-18T18:43:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3eaac6307dff1e281f89fece521dc8a14078bf61'/>
<id>3eaac6307dff1e281f89fece521dc8a14078bf61</id>
<content type='text'>
Add support for capturing ethernet packets and storing
them in memory in PCAP(2.4) format, later to be analyzed by
any PCAP viewer software (IE. Wireshark)

This feature greatly assist debugging network issues such
as detecting dropped packets, packet corruption etc.

Signed-off-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
Reviewed-by: Alex Marginean &lt;alexm.osslist@gmail.com&gt;
Tested-by: Alex Marginean &lt;alexm.osslist@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for capturing ethernet packets and storing
them in memory in PCAP(2.4) format, later to be analyzed by
any PCAP viewer software (IE. Wireshark)

This feature greatly assist debugging network issues such
as detecting dropped packets, packet corruption etc.

Signed-off-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
Reviewed-by: Alex Marginean &lt;alexm.osslist@gmail.com&gt;
Tested-by: Alex Marginean &lt;alexm.osslist@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Fix Covarity Defect 244093</title>
<updated>2019-09-04T16:37:18+00:00</updated>
<author>
<name>Joe Hershberger</name>
<email>joe.hershberger@ni.com</email>
</author>
<published>2019-07-30T19:49:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=398e7512d8d7ea5aac8ba0a72c07a3810ce39f42'/>
<id>398e7512d8d7ea5aac8ba0a72c07a3810ce39f42</id>
<content type='text'>
Don't allow unterminated strings

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't allow unterminated strings

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
