<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/net, branch v2019.04</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>lmb: handle more than one DRAM BANK</title>
<updated>2019-02-02T13:19:17+00:00</updated>
<author>
<name>Simon Goldschmidt</name>
<email>simon.k.r.goldschmidt@gmail.com</email>
</author>
<published>2019-01-26T21:13:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9cc2323feebdde500f50f7abb855045dbde765cb'/>
<id>9cc2323feebdde500f50f7abb855045dbde765cb</id>
<content type='text'>
This fixes the automatic lmb initialization and reservation for boards
with more than one DRAM bank.

This fixes the CVE-2018-18439 and -18440 fixes that only allowed to load
files into the firs DRAM bank from fs and via tftp.

Found-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Signed-off-by: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
Tested-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes the automatic lmb initialization and reservation for boards
with more than one DRAM bank.

This fixes the CVE-2018-18439 and -18440 fixes that only allowed to load
files into the firs DRAM bank from fs and via tftp.

Found-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Signed-off-by: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
Tested-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: lmb: rename lmb_get_unreserved_size to lmb_get_free_size</title>
<updated>2019-01-26T13:13:57+00:00</updated>
<author>
<name>Simon Goldschmidt</name>
<email>simon.k.r.goldschmidt@gmail.com</email>
</author>
<published>2019-01-21T19:29:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=65304aade8041c03859d0f7b210f2e2a4d46bec0'/>
<id>65304aade8041c03859d0f7b210f2e2a4d46bec0</id>
<content type='text'>
As a follow-up, change the name of the newly introduced function
'lmb_get_unreserved_size' to 'lmb_get_free_size', which is more
appropriate.

Signed-off-by: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
[trini: Fix test/lib/lmb.c]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As a follow-up, change the name of the newly introduced function
'lmb_get_unreserved_size' to 'lmb_get_free_size', which is more
appropriate.

Signed-off-by: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
[trini: Fix test/lib/lmb.c]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: remove CONFIG_MCAST_TFTP</title>
<updated>2019-01-24T17:35:30+00:00</updated>
<author>
<name>Chris Packham</name>
<email>judge.packham@gmail.com</email>
</author>
<published>2018-11-26T08:00:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=67bb984249442378ebb6a0eb68b6b0dd67dfbe72'/>
<id>67bb984249442378ebb6a0eb68b6b0dd67dfbe72</id>
<content type='text'>
No mainline board enables CONFIG_MCAST_TFTP and there have been
compilation issues with the code for some time. Additionally, it has a
potential buffer underrun issue (reported as a side note in
CVE-2018-18439).

Remove the multicast TFTP code but keep the driver API for the future
addition of IPv6.

Cc: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
Signed-off-by: Chris Packham &lt;judge.packham@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>
No mainline board enables CONFIG_MCAST_TFTP and there have been
compilation issues with the code for some time. Additionally, it has a
potential buffer underrun issue (reported as a side note in
CVE-2018-18439).

Remove the multicast TFTP code but keep the driver API for the future
addition of IPv6.

Cc: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
Signed-off-by: Chris Packham &lt;judge.packham@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: move ether_crc to tsec driver</title>
<updated>2019-01-24T17:35:29+00:00</updated>
<author>
<name>Chris Packham</name>
<email>judge.packham@gmail.com</email>
</author>
<published>2018-11-26T08:00:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1a4af5c562fdb9f5a884a53f136f2b2075ffd1d8'/>
<id>1a4af5c562fdb9f5a884a53f136f2b2075ffd1d8</id>
<content type='text'>
ether_crc was added to the core net code in commit 53a5c424bf86
("multicast tftp: RFC2090") so that other drivers could use it. However
the only current user of it is tsec.c so move it there.

Signed-off-by: Chris Packham &lt;judge.packham@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>
ether_crc was added to the core net code in commit 53a5c424bf86
("multicast tftp: RFC2090") so that other drivers could use it. However
the only current user of it is tsec.c so move it there.

Signed-off-by: Chris Packham &lt;judge.packham@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: explicitly assign errno to return code in case of network failure</title>
<updated>2019-01-24T17:35:28+00:00</updated>
<author>
<name>Thomas RIENOESSL</name>
<email>thomas.rienoessl@bachmann.info</email>
</author>
<published>2018-11-21T14:56:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a735e6e9d639114d67e4440f9e051a89d2094118'/>
<id>a735e6e9d639114d67e4440f9e051a89d2094118</id>
<content type='text'>
When dealing with two ethernet ports and having "netretry" set
to "once", it could occur that the connection (e.g. an ARP
request) failed, hence the status of the netloop was
"NETLOOP_FAIL". Due to the setting of "netretry", the network
logic would then switch to the other network interface,
assigning "ret" with the return value of "net_start_again()".
If this call succeeded we would return 0 (i.e. success) to
the caller when in reality the network action failed.

Signed-off-by: Thomas RIENOESSL &lt;thomas.rienoessl@bachmann.info&gt;
Reviewed-by: Christian Gmeiner &lt;christian.gmeiner@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>
When dealing with two ethernet ports and having "netretry" set
to "once", it could occur that the connection (e.g. an ARP
request) failed, hence the status of the netloop was
"NETLOOP_FAIL". Due to the setting of "netretry", the network
logic would then switch to the other network interface,
assigning "ret" with the return value of "net_start_again()".
If this call succeeded we would return 0 (i.e. success) to
the caller when in reality the network action failed.

Signed-off-by: Thomas RIENOESSL &lt;thomas.rienoessl@bachmann.info&gt;
Reviewed-by: Christian Gmeiner &lt;christian.gmeiner@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tftp: prevent overwriting reserved memory</title>
<updated>2019-01-17T04:15:53+00:00</updated>
<author>
<name>Simon Goldschmidt</name>
<email>simon.k.r.goldschmidt@gmail.com</email>
</author>
<published>2019-01-14T21:38:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a156c47e39ad7d007c88919103ee0ee131c6203b'/>
<id>a156c47e39ad7d007c88919103ee0ee131c6203b</id>
<content type='text'>
This fixes CVE-2018-18439 ("insufficient boundary checks in network
image boot") by using lmb to check for a valid range to store
received blocks.

Signed-off-by: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
[trini: Always build lib/lmb.o on LMB and lib/fdtdec.o on OF_LIBFDT]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes CVE-2018-18439 ("insufficient boundary checks in network
image boot") by using lmb to check for a valid range to store
received blocks.

Signed-off-by: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
[trini: Always build lib/lmb.o on LMB and lib/fdtdec.o on OF_LIBFDT]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Consolidate UDP header functions</title>
<updated>2018-10-10T17:29:02+00:00</updated>
<author>
<name>Duncan Hare</name>
<email>DH@Synoia.com</email>
</author>
<published>2018-06-24T22:40:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5d457ecbef5eba8eaeed513c65c55453de4f3975'/>
<id>5d457ecbef5eba8eaeed513c65c55453de4f3975</id>
<content type='text'>
Make it possible to add TCP versions of the same, while reusing
IP portions. This patch should not change any behavior.

Signed-off-by: Duncan Hare &lt;DH@Synoia.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>
Make it possible to add TCP versions of the same, while reusing
IP portions. This patch should not change any behavior.

Signed-off-by: Duncan Hare &lt;DH@Synoia.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Don't overwrite waiting packets with asynchronous replies</title>
<updated>2018-10-10T17:29:01+00:00</updated>
<author>
<name>Joe Hershberger</name>
<email>joe.hershberger@ni.com</email>
</author>
<published>2018-09-26T21:49:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ac3f26cc15ad7e3e9efc2b0b0e18c6e84d93af77'/>
<id>ac3f26cc15ad7e3e9efc2b0b0e18c6e84d93af77</id>
<content type='text'>
Peter originally sent a fix, but it breaks a number of other things.
This addresses the original reported issue in a different way.

That report was:

&gt; U-Boot has 1 common buffer to send Ethernet frames, pointed to by
&gt; net_tx_packet.  When sending to an IP address without knowing the MAC
&gt; address, U-Boot makes an ARP request (using the arp_tx_packet buffer)
&gt; to find out the MAC address of the IP addressr. When a matching ARP
&gt; reply is received, U-Boot continues sending the frame stored in the
&gt; net_tx_packet buffer.
&gt;
&gt; However, in the mean time, if U-Boot needs to send out any network
&gt; packets (e.g. replying ping packets or ARP requests for its own IP
&gt; address etc.), it will use the net_tx_packet buffer to prepare the
&gt; new packet. Thus this buffer is no longer the original packet meant
&gt; to be transmitted after the ARP reply. The original packet will be
&gt; lost.

This instead uses the ARP tx buffer to send async replies in the case
where we are actively waiting for an ARP reply.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;

Reported-by: Tran Tien Dat &lt;peter.trantiendat@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Peter originally sent a fix, but it breaks a number of other things.
This addresses the original reported issue in a different way.

That report was:

&gt; U-Boot has 1 common buffer to send Ethernet frames, pointed to by
&gt; net_tx_packet.  When sending to an IP address without knowing the MAC
&gt; address, U-Boot makes an ARP request (using the arp_tx_packet buffer)
&gt; to find out the MAC address of the IP addressr. When a matching ARP
&gt; reply is received, U-Boot continues sending the frame stored in the
&gt; net_tx_packet buffer.
&gt;
&gt; However, in the mean time, if U-Boot needs to send out any network
&gt; packets (e.g. replying ping packets or ARP requests for its own IP
&gt; address etc.), it will use the net_tx_packet buffer to prepare the
&gt; new packet. Thus this buffer is no longer the original packet meant
&gt; to be transmitted after the ARP reply. The original packet will be
&gt; lost.

This instead uses the ARP tx buffer to send async replies in the case
where we are actively waiting for an ARP reply.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;

Reported-by: Tran Tien Dat &lt;peter.trantiendat@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Add an accessor to know if waiting for ARP</title>
<updated>2018-10-10T17:28:58+00:00</updated>
<author>
<name>Joe Hershberger</name>
<email>joe.hershberger@ni.com</email>
</author>
<published>2018-09-26T21:48:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3f02c98bd1000fc26ee2700fd5a75112cdeaca6c'/>
<id>3f02c98bd1000fc26ee2700fd5a75112cdeaca6c</id>
<content type='text'>
This single-sources the state of the ARP.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This single-sources the state of the ARP.

Signed-off-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: eth-uclass: Fix for DM USB ethernet support</title>
<updated>2018-08-21T14:21:37+00:00</updated>
<author>
<name>Jean-Jacques Hiblot</name>
<email>jjhiblot@ti.com</email>
</author>
<published>2018-08-09T14:17:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c3211708cf721163733f03330bdb579d8c0f689b'/>
<id>c3211708cf721163733f03330bdb579d8c0f689b</id>
<content type='text'>
When a USB ethernet device is halted, the device driver is removed. When
this happens the uclass private memory is freed and uclass_priv is set to
NULL. This causes a data abort when uclass_priv-&gt;state is then set to
ETH_STATE_PASSIVE.

Fix it by checking if uclass_priv is NULL before setting uclass_priv-&gt;state

Signed-off-by: Jean-Jacques Hiblot &lt;jjhiblot@ti.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>
When a USB ethernet device is halted, the device driver is removed. When
this happens the uclass private memory is freed and uclass_priv is set to
NULL. This causes a data abort when uclass_priv-&gt;state is then set to
ETH_STATE_PASSIVE.

Fix it by checking if uclass_priv is NULL before setting uclass_priv-&gt;state

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