<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/test/py, branch v2021.04-rc2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/test/py?h=v2021.04-rc2</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/test/py?h=v2021.04-rc2'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2021-02-16T03:31:54Z</updated>
<entry>
<title>image: Check for unit addresses in FITs</title>
<updated>2021-02-16T03:31:54Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-02-16T00:08:12Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3f04db891a353f4b127ed57279279f851c6b4917'/>
<id>urn:sha1:3f04db891a353f4b127ed57279279f851c6b4917</id>
<content type='text'>
Using unit addresses in a FIT is a security risk. Add a check for this
and disallow it.

CVE-2021-27138

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reported-by: Bruce Monroe &lt;bruce.monroe@intel.com&gt;
Reported-by: Arie Haenel &lt;arie.haenel@intel.com&gt;
Reported-by: Julien Lenoir &lt;julien.lenoir@intel.com&gt;
</content>
</entry>
<entry>
<title>libfdt: Check for multiple/invalid root nodes</title>
<updated>2021-02-16T03:31:53Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-02-16T00:08:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=124c255731c76a2b09587378b2bcce561bcd3f2d'/>
<id>urn:sha1:124c255731c76a2b09587378b2bcce561bcd3f2d</id>
<content type='text'>
It is possible to construct a devicetree blob with multiple root nodes.
Update fdt_check_full() to check for this, along with a root node with an
invalid name.

CVE-2021-27097

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reported-by: Bruce Monroe &lt;bruce.monroe@intel.com&gt;
Reported-by: Arie Haenel &lt;arie.haenel@intel.com&gt;
Reported-by: Julien Lenoir &lt;julien.lenoir@intel.com&gt;
</content>
</entry>
<entry>
<title>test: Add tests for the 'evil' vboot attacks</title>
<updated>2021-02-16T00:17:33Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-02-16T00:08:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d5f3aadacbc63df3b690d6fd9f0aa3f575b43356'/>
<id>urn:sha1:d5f3aadacbc63df3b690d6fd9f0aa3f575b43356</id>
<content type='text'>
Add tests to check that these two attacks are mitigated by recent patches.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reported-by: Bruce Monroe &lt;bruce.monroe@intel.com&gt;
Reported-by: Arie Haenel &lt;arie.haenel@intel.com&gt;
Reported-by: Julien Lenoir &lt;julien.lenoir@intel.com&gt;
</content>
</entry>
<entry>
<title>test: Add vboot_evil implementation</title>
<updated>2021-02-16T00:17:29Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-02-16T00:08:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fafafacb470b345f2f41b86e4633ef91a7c5ed23'/>
<id>urn:sha1:fafafacb470b345f2f41b86e4633ef91a7c5ed23</id>
<content type='text'>
Add a library which performs two different attacks on a FIT.

Signed-off-by: Julien Lenoir &lt;julien.lenoir@intel.com&gt;
Signed-off-by: Bruce Monroe &lt;bruce.monroe@intel.com&gt;
Signed-off-by: Arie Haenel &lt;arie.haenel@intel.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>fit: Don't allow verification of images with @ nodes</title>
<updated>2021-02-16T00:17:25Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-02-16T00:08:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=79af75f7776fc20b0d7eb6afe1e27c00fdb4b9b4'/>
<id>urn:sha1:79af75f7776fc20b0d7eb6afe1e27c00fdb4b9b4</id>
<content type='text'>
When searching for a node called 'fred', any unit address appended to the
name is ignored by libfdt, meaning that 'fred' can match 'fred@1'. This
means that we cannot be sure that the node originally intended is the one
that is used.

Disallow use of nodes with unit addresses.

Update the forge test also, since it uses @ addresses.

CVE-2021-27138

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reported-by: Bruce Monroe &lt;bruce.monroe@intel.com&gt;
Reported-by: Arie Haenel &lt;arie.haenel@intel.com&gt;
Reported-by: Julien Lenoir &lt;julien.lenoir@intel.com&gt;
</content>
</entry>
<entry>
<title>test/py: fix runtest wrapper for pytest 6</title>
<updated>2021-02-01T21:33:02Z</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@wwwdotorg.org</email>
</author>
<published>2021-01-31T03:12:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=372497572b1102153a98bf20b833eb9d470c3805'/>
<id>urn:sha1:372497572b1102153a98bf20b833eb9d470c3805</id>
<content type='text'>
The implementation of pytest_runtest_protocol() must call
pytest_runtest_logstart() and pytest_runtest_logfinish(). This appears to
be necessary even in pytest 5.2.1 judging by the default version of
pytest_runtest_protocol(), but evidently some form of code reorganization
in pytest only made this have a practical effect in the newer version. I'd
previously been under the impression that 100% of the required work of
pytest_runtest_protocol() was handled by the fact it called
runtestprotocol() as its implementation. However, it appears that custom
implementations do need to do a little more than this.

Reported-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Signed-off-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>test: Update test_fs to not use deprecated pytest.yield_fixture()</title>
<updated>2021-01-29T15:36:49Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2021-01-28T19:39:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a59e59c9be844553384b67c36a8040f65ec10011'/>
<id>urn:sha1:a59e59c9be844553384b67c36a8040f65ec10011</id>
<content type='text'>
As noted in comments, yield_fixture has been deprecated for longer than
our minimum required version of pytest.  Newer versions of pytest cause
this to be a louder warning, and as the migration is trivial, perform it
now.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>test: correct entry point to pytest</title>
<updated>2021-01-29T15:36:49Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2021-01-28T11:46:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=89d52afa5d0b643bddbedd840cea98ea7cba84f9'/>
<id>urn:sha1:89d52afa5d0b643bddbedd840cea98ea7cba84f9</id>
<content type='text'>
With Pytest 6.0.2 'make tests' fails:

sandbox: Traceback (most recent call last):
  File "./test/py/test.py", line 20, in &lt;module&gt;
    sys.exit(load_entry_point('pytest', 'console_scripts', 'pytest')(args))
TypeError: console_main() takes 0 positional arguments but 1 was given

The definition of console_scripts has changed as follows:

Pytest 4.6.1:

[options.entry_points]
console_scripts =
        pytest=pytest:main
        py.test=pytest:main
        
Pytest 6.0.2:
        
[options.entry_points]
console_scripts =
    pytest=pytest:console_main
    py.test=pytest:console_main

The new function console_main() has a comment:
"This function is not meant for programmable use; use `main()`"

Hence let's call pytest.main() directly.
Move args processing into the __main__ paragraph.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Tested-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Tested-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>test: test_ofplatdata: Mark as sandbox specific</title>
<updated>2021-01-29T15:34:34Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2021-01-19T19:40:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e6b8e948abda64c52bb6535d8670121f7e2953ce'/>
<id>urn:sha1:e6b8e948abda64c52bb6535d8670121f7e2953ce</id>
<content type='text'>
This test checks for output specific to the sandbox device tree, mark it
as sandbox specific.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>doc: move test/py/README.md to HTML documentation</title>
<updated>2021-01-23T14:53:46Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2021-01-18T19:24:03Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0157619d5c8beb9cf06b096c83330a312a9bf65d'/>
<id>urn:sha1:0157619d5c8beb9cf06b096c83330a312a9bf65d</id>
<content type='text'>
Convert test/py/README.md to restructured text and add it to the generated
HTML documentation.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
</feed>
