<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/disk, 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>disk: part_dos: correctly detect DOS PBR</title>
<updated>2019-10-31T11:22:53+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2019-10-15T18:43:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=34856b0f1c4e56ad63879b9cdef71302225423cd'/>
<id>34856b0f1c4e56ad63879b9cdef71302225423cd</id>
<content type='text'>
The signature 0x55 0xAA in bytes 510 and 511 of the first sector can either
indicate a DOS partition table of the first sector of a FAT file system.

The current code tries to check if the partition table is valid by looking
at the boot indicator of the partition entries. But first of all it does
not count from 0 to 3 but only from 0 to 2. And second it misses to
increment the pointer for the partition entry.

If it is a FAT file system can be discovered by looking for the text 'FAT'
at offset 0x36 or 'FAT32' at offset 0x52. In a DOS PBR there are no
partition entries, so those bytes are undefined. Don't require the byte at
offset 0x1BE to differ from 0x00 and 0x80.

With the patch the logic is changed as follows:

If the partition table has either an invalid boot flag for any partition or
has no partition at all, check if the first sector is a DOS PBR by looking
at the FAT* signature.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The signature 0x55 0xAA in bytes 510 and 511 of the first sector can either
indicate a DOS partition table of the first sector of a FAT file system.

The current code tries to check if the partition table is valid by looking
at the boot indicator of the partition entries. But first of all it does
not count from 0 to 3 but only from 0 to 2. And second it misses to
increment the pointer for the partition entry.

If it is a FAT file system can be discovered by looking for the text 'FAT'
at offset 0x36 or 'FAT32' at offset 0x52. In a DOS PBR there are no
partition entries, so those bytes are undefined. Don't require the byte at
offset 0x1BE to differ from 0x00 and 0x80.

With the patch the logic is changed as follows:

If the partition table has either an invalid boot flag for any partition or
has no partition at all, check if the first sector is a DOS PBR by looking
at the FAT* signature.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>disk: part_dos: Allocate at least one block size for mbr</title>
<updated>2019-09-19T16:54:29+00:00</updated>
<author>
<name>Faiz Abbas</name>
<email>faiz_abbas@ti.com</email>
</author>
<published>2019-09-04T14:40:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7aed3d380981565b5bb2810d5d13aad1ff994f1a'/>
<id>7aed3d380981565b5bb2810d5d13aad1ff994f1a</id>
<content type='text'>
The blk_dread() following the mbr allocation reads one block from the
device. This will lead to overflow if block size is greater than the
size of legacy_mbr. Fix this by allocating at least one block size.

Signed-off-by: Faiz Abbas &lt;faiz_abbas@ti.com&gt;
Acked-by: Alexey Brodkin &lt;abrodkin@synopsys.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The blk_dread() following the mbr allocation reads one block from the
device. This will lead to overflow if block size is greater than the
size of legacy_mbr. Fix this by allocating at least one block size.

Signed-off-by: Faiz Abbas &lt;faiz_abbas@ti.com&gt;
Acked-by: Alexey Brodkin &lt;abrodkin@synopsys.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>disk: efi: ignore 'IGNOREME' GPT header found on cros eMMCs</title>
<updated>2019-08-23T10:15:50+00:00</updated>
<author>
<name>Urja Rannikko</name>
<email>urjaman@gmail.com</email>
</author>
<published>2019-04-11T20:27:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0557d46b63cc1d871f3752ed771a9fc13d0c9786'/>
<id>0557d46b63cc1d871f3752ed771a9fc13d0c9786</id>
<content type='text'>
Some ChromeOS devices (atleast veyron speedy) have the first 8MiB of
the eMMC write protected and equipped with a dummy 'IGNOREME' GPT
header - instead of spewing error messages about it, just silently
try the backup GPT.

Note: this does not touch the gpt cmd writing/verifying functions,
those will still complain.

Signed-off-by: Urja Rannikko &lt;urjaman@gmail.com&gt;
Reviewed-by: Kever Yang &lt;kever.yang@rock-chips.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some ChromeOS devices (atleast veyron speedy) have the first 8MiB of
the eMMC write protected and equipped with a dummy 'IGNOREME' GPT
header - instead of spewing error messages about it, just silently
try the backup GPT.

Note: this does not touch the gpt cmd writing/verifying functions,
those will still complain.

Signed-off-by: Urja Rannikko &lt;urjaman@gmail.com&gt;
Reviewed-by: Kever Yang &lt;kever.yang@rock-chips.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>disk: efi: unify code for finding a valid gpt</title>
<updated>2019-08-23T10:15:32+00:00</updated>
<author>
<name>Urja Rannikko</name>
<email>urjaman@gmail.com</email>
</author>
<published>2019-04-11T20:27:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=20c568cae6e95c727bb97ba55a558916dc42baf4'/>
<id>20c568cae6e95c727bb97ba55a558916dc42baf4</id>
<content type='text'>
There were 3 copies of the same sequence, make it into a function.

Signed-off-by: Urja Rannikko &lt;urjaman@gmail.com&gt;
Reviewed-by: Kever Yang &lt;kever.yang@rock-chips.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There were 3 copies of the same sequence, make it into a function.

Signed-off-by: Urja Rannikko &lt;urjaman@gmail.com&gt;
Reviewed-by: Kever Yang &lt;kever.yang@rock-chips.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: Move env_get() to env.h</title>
<updated>2019-08-11T20:43:41+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2019-08-01T15:46:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7b51b576d6db714e8668a98de67e93651e18123c'/>
<id>7b51b576d6db714e8668a98de67e93651e18123c</id>
<content type='text'>
Move env_get() over to the new header file.

Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move env_get() over to the new header file.

Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>disk: part: Extend API to get partition info</title>
<updated>2019-07-24T17:16:29+00:00</updated>
<author>
<name>Ruslan Trofymenko</name>
<email>ruslan.trofymenko@linaro.org</email>
</author>
<published>2019-07-05T12:37:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6eccd1f740601f39796bace54c40cd785408e74e'/>
<id>6eccd1f740601f39796bace54c40cd785408e74e</id>
<content type='text'>
This patch adds part_get_info_by_dev_and_name_or_num() function which
allows us to get partition info from its number or name. Partition of
interest is specified by string like "device_num:partition_number" or
"device_num#partition_name".

The patch was extracted from [1].

[1] https://android-review.googlesource.com/c/platform/external/u-boot/+/729880/2

Signed-off-by: Ruslan Trofymenko &lt;ruslan.trofymenko@linaro.org&gt;
Signed-off-by: Igor Opaniuk &lt;igor.opaniuk@gmail.com&gt;
Reviewed-by: Alistair Strachan &lt;astrachan@google.com&gt;
Reviewed-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds part_get_info_by_dev_and_name_or_num() function which
allows us to get partition info from its number or name. Partition of
interest is specified by string like "device_num:partition_number" or
"device_num#partition_name".

The patch was extracted from [1].

[1] https://android-review.googlesource.com/c/platform/external/u-boot/+/729880/2

Signed-off-by: Ruslan Trofymenko &lt;ruslan.trofymenko@linaro.org&gt;
Signed-off-by: Igor Opaniuk &lt;igor.opaniuk@gmail.com&gt;
Reviewed-by: Alistair Strachan &lt;astrachan@google.com&gt;
Reviewed-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'efi-2019-10-rc1-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi</title>
<updated>2019-07-24T02:29:53+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2019-07-24T02:29:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fe4243870df152f839f88e5aa355f53cfba0a866'/>
<id>fe4243870df152f839f88e5aa355f53cfba0a866</id>
<content type='text'>
Pull request for UEFI sub-system for v2019.10-rc1 (2)

* Implement the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event.
* Address errors of type -Werror=address-of-packed-member when building
  with GCC9.1
* Fix an error when adding memory add addres 0x00000000.
* Rework some code comments for Sphinx compliance.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull request for UEFI sub-system for v2019.10-rc1 (2)

* Implement the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event.
* Address errors of type -Werror=address-of-packed-member when building
  with GCC9.1
* Fix an error when adding memory add addres 0x00000000.
* Rework some code comments for Sphinx compliance.
</pre>
</div>
</content>
</entry>
<entry>
<title>CVE-2019-13103: disk: stop infinite recursion in DOS Partitions</title>
<updated>2019-07-18T15:31:28+00:00</updated>
<author>
<name>Paul Emge</name>
<email>paulemge@forallsecure.com</email>
</author>
<published>2019-07-08T23:37:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=232e2f4fd9a24bf08215ddc8c53ccadffc841fb5'/>
<id>232e2f4fd9a24bf08215ddc8c53ccadffc841fb5</id>
<content type='text'>
part_get_info_extended and print_partition_extended can recurse infinitely
while parsing a self-referential filesystem or one with a silly number of
extended partitions. This patch adds a limit to the number of recursive
partitions.

Signed-off-by: Paul Emge &lt;paulemge@forallsecure.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
part_get_info_extended and print_partition_extended can recurse infinitely
while parsing a self-referential filesystem or one with a silly number of
extended partitions. This patch adds a limit to the number of recursive
partitions.

Signed-off-by: Paul Emge &lt;paulemge@forallsecure.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>disk: efi: avoid unaligned pointer error</title>
<updated>2019-07-16T22:17:21+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2019-07-14T16:12:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=06e921b185f4f7af0a51bb2451cd56eb6c5b26da'/>
<id>06e921b185f4f7af0a51bb2451cd56eb6c5b26da</id>
<content type='text'>
When building with GCC 9.1 an error occurs:

disk/part_efi.c: In function ‘gpt_verify_partitions’:
disk/part_efi.c:737:49: error: taking address of packed member of
‘struct _gpt_entry’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
  737 |   gpt_convert_efi_name_to_char(efi_str, gpt_e[i].partition_name,
      |                                         ~~~~~~~~^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:279: disk/part_efi.o] Error 1
make: *** [Makefile:1594: disk] Error 2

Adjust gpt_convert_efi_name_to_char() to accept unaligned strings.

Reported-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When building with GCC 9.1 an error occurs:

disk/part_efi.c: In function ‘gpt_verify_partitions’:
disk/part_efi.c:737:49: error: taking address of packed member of
‘struct _gpt_entry’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
  737 |   gpt_convert_efi_name_to_char(efi_str, gpt_e[i].partition_name,
      |                                         ~~~~~~~~^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:279: disk/part_efi.o] Error 1
make: *** [Makefile:1594: disk] Error 2

Adjust gpt_convert_efi_name_to_char() to accept unaligned strings.

Reported-by: Ramon Fried &lt;rfried.dev@gmail.com&gt;
Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>disk: efi: buffer overflow in part_get_info_efi()</title>
<updated>2019-07-06T19:25:31+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2019-07-05T19:27:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5375ee508fead38c733a56b394db7bae86435390'/>
<id>5375ee508fead38c733a56b394db7bae86435390</id>
<content type='text'>
In part_get_info_efi() we use the output of print_efiname() to set
info-&gt;name[]. The size of info-&gt;name is PART_NAME_LEN = 32 but
print_efiname() returns a string with a maximum length of
PARTNAME_SZ + 1 = 37.

Use snprintf() instead of sprintf() to avoid buffer overflow.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In part_get_info_efi() we use the output of print_efiname() to set
info-&gt;name[]. The size of info-&gt;name is PART_NAME_LEN = 32 but
print_efiname() returns a string with a maximum length of
PARTNAME_SZ + 1 = 37.

Use snprintf() instead of sprintf() to avoid buffer overflow.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
