diff options
Diffstat (limited to 'meta/recipes-devtools/dmidecode/dmidecode/CVE-2023-30630_3.patch')
-rw-r--r-- | meta/recipes-devtools/dmidecode/dmidecode/CVE-2023-30630_3.patch | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/meta/recipes-devtools/dmidecode/dmidecode/CVE-2023-30630_3.patch b/meta/recipes-devtools/dmidecode/dmidecode/CVE-2023-30630_3.patch index 01d0d1f867..5a6994065e 100644 --- a/meta/recipes-devtools/dmidecode/dmidecode/CVE-2023-30630_3.patch +++ b/meta/recipes-devtools/dmidecode/dmidecode/CVE-2023-30630_3.patch | |||
@@ -27,26 +27,26 @@ Signed-off-by: Yogita Urade <yogita.urade@windriver.com> | |||
27 | 1 file changed, 9 insertions(+), 2 deletions(-) | 27 | 1 file changed, 9 insertions(+), 2 deletions(-) |
28 | 28 | ||
29 | diff --git a/dmidecode.c b/dmidecode.c | 29 | diff --git a/dmidecode.c b/dmidecode.c |
30 | index 98f9692..b4dbc9d 100644 | 30 | index d339577..1ecdf85 100644 |
31 | --- a/dmidecode.c | 31 | --- a/dmidecode.c |
32 | +++ b/dmidecode.c | 32 | +++ b/dmidecode.c |
33 | @@ -5997,17 +5997,25 @@ int main(int argc, char * const argv[]) | 33 | @@ -6031,17 +6031,25 @@ int main(int argc, char * const argv[]) |
34 | pr_comment("dmidecode %s", VERSION); | 34 | pr_comment("dmidecode %s", VERSION); |
35 | 35 | ||
36 | /* Read from dump if so instructed */ | 36 | /* Read from dump if so instructed */ |
37 | + size = 0x20; | 37 | + size = 0x20; |
38 | if (opt.flags & FLAG_FROM_DUMP) | 38 | if (opt.flags & FLAG_FROM_DUMP) |
39 | { | 39 | { |
40 | if (!(opt.flags & FLAG_QUIET)) | 40 | if (!(opt.flags & FLAG_QUIET)) |
41 | pr_info("Reading SMBIOS/DMI data from file %s.", | 41 | pr_info("Reading SMBIOS/DMI data from file %s.", |
42 | opt.dumpfile); | 42 | opt.dumpfile); |
43 | - if ((buf = mem_chunk(0, 0x20, opt.dumpfile)) == NULL) | 43 | - if ((buf = mem_chunk(0, 0x20, opt.dumpfile)) == NULL) |
44 | + if ((buf = read_file(0, &size, opt.dumpfile)) == NULL) | 44 | + if ((buf = read_file(0, &size, opt.dumpfile)) == NULL) |
45 | { | 45 | { |
46 | ret = 1; | 46 | ret = 1; |
47 | goto exit_free; | 47 | goto exit_free; |
48 | } | 48 | } |
49 | 49 | ||
50 | + /* Truncated entry point can't be processed */ | 50 | + /* Truncated entry point can't be processed */ |
51 | + if (size < 0x20) | 51 | + if (size < 0x20) |
52 | + { | 52 | + { |
@@ -54,16 +54,17 @@ index 98f9692..b4dbc9d 100644 | |||
54 | + goto done; | 54 | + goto done; |
55 | + } | 55 | + } |
56 | + | 56 | + |
57 | if (memcmp(buf, "_SM3_", 5) == 0) | 57 | if (memcmp(buf, "_SM3_", 5) == 0) |
58 | { | 58 | { |
59 | if (smbios3_decode(buf, opt.dumpfile, 0)) | 59 | if (smbios3_decode(buf, opt.dumpfile, 0)) |
60 | @@ -6031,7 +6039,6 @@ int main(int argc, char * const argv[]) | 60 | @@ -6065,7 +6073,6 @@ int main(int argc, char * const argv[]) |
61 | * contain one of several types of entry points, so read enough for | 61 | * contain one of several types of entry points, so read enough for |
62 | * the largest one, then determine what type it contains. | 62 | * the largest one, then determine what type it contains. |
63 | */ | 63 | */ |
64 | - size = 0x20; | 64 | - size = 0x20; |
65 | if (!(opt.flags & FLAG_NO_SYSFS) | 65 | if (!(opt.flags & FLAG_NO_SYSFS) |
66 | && (buf = read_file(0, &size, SYS_ENTRY_FILE)) != NULL) | 66 | && (buf = read_file(0, &size, SYS_ENTRY_FILE)) != NULL) |
67 | { | 67 | { |
68 | -- | 68 | -- |
69 | 2.40.0 | 69 | 2.42.0 |
70 | |||