Commit Graph

5 Commits

Author SHA1 Message Date
Yuta Hayama
3b9c48837f linux/generate-cve-exclusions: fix mishandling of boundary values
affected_versions in kernel_cves.json does not mean "first affected version
to last affected version" but actually "first affected version to fixed
version". Therefore, the variable names, conditional expressions, and
CVE_STATUS descriptions should be fixed.

For example, when the script was run against v6.1, if affected_versions was
"xxx to 6.1", the output was "cpe-stable-backport: Backported in 6.1", but
this should be "fixed-version: Fixed from version 6.1".

(From OE-Core rev: 2064b2f9b92e2dff45dab633598b5ed37145d0b6)

Signed-off-by: Yuta Hayama <hayama@lineo.co.jp>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07 14:52:04 +01:00
Yuta Hayama
dd2e4f417c linux/generate-cve-exclusions: print the generated time in UTC
Allow time comparisons to be made regardless of where the script was run.

(From OE-Core rev: 018e74f2ce0b1a4c0614c99bc19f07f787d61123)

Signed-off-by: Yuta Hayama <hayama@lineo.co.jp>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-06 17:52:45 +01:00
Ross Burton
2b0eac4dd6 linux/generate-cve-exclusions: add version check warning
Embed the version that this file was generated for in the include, and
compare it to the version that is being checked.

This should act as a reminder to update the file when the kernel is
upgraded.

(From OE-Core rev: 645066ecec0f52eac0225a144285f44882003856)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-30 09:56:13 +01:00
Ross Burton
a105e7d254 linux/generate-cve-exclusions.py: fix comparison
The backport detection logic didn't handle issues which were backported
to the current version.

(From OE-Core rev: 1c7b01627b47604744f723d5eeedd455df6307e2)

(From OE-Core rev: 568d65ccfb0e44ef3a40951d9da297036e7f345d)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-22 15:13:54 +01:00
Ross Burton
04a4bac6d2 linux-yocto: add script to generate kernel CVE_STATUS entries
Instead of manually looking up new CVEs and determining what point
releases the fixes are incorporated into, add a script to generate the
CVE_STATUS data automatically.

First, note that this is very much an interim solution until the
cve-check class fetches data from www.linuxkernelcves.com directly.

The script should be passed the path to a local clone of the
linuxkernelcves repository[1] and the kernel version number. It will
then write to standard output the CVE_STATUS entries for every known
kernel CVE.

The script should be periodically reran as CVEs are backported and
kernels upgraded frequently.

[1] https://github.com/nluedtke/linux_kernel_cves

(From OE-Core rev: 8cb184f9de9b0ce5f465ea12ba24beafd6673f01)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-09 21:48:11 +01:00