diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2026-03-21 12:55:56 +0100 |
|---|---|---|
| committer | Anuj Mittal <anuj.mittal@oss.qualcomm.com> | 2026-03-26 10:29:24 +0530 |
| commit | bddcebdc4b104add666aa113bc5398bbc966df11 (patch) | |
| tree | 88466f20da9157945130ad2dd9ecd32b885fec02 | |
| parent | 56f9f2dbd5addba126a2754abaf71fca01bc8c3c (diff) | |
| download | meta-openembedded-bddcebdc4b104add666aa113bc5398bbc966df11.tar.gz | |
libde265: patch CVE-2025-61147
Details: https://nvd.nist.gov/vuln/detail/CVE-2025-61147
Backport the patch referenced by the NVD advisory.
Note that this is a partial backport - only the parts that are
used by the application, and without pulling in c++17 headers.
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
| -rw-r--r-- | meta-multimedia/recipes-multimedia/libde265/libde265/CVE-2025-61147.patch | 84 | ||||
| -rw-r--r-- | meta-multimedia/recipes-multimedia/libde265/libde265_1.0.16.bb | 4 |
2 files changed, 87 insertions, 1 deletions
diff --git a/meta-multimedia/recipes-multimedia/libde265/libde265/CVE-2025-61147.patch b/meta-multimedia/recipes-multimedia/libde265/libde265/CVE-2025-61147.patch new file mode 100644 index 0000000000..e3c2ce40e7 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/libde265/libde265/CVE-2025-61147.patch | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | From 4f267b389e33e30f9eccfedd5768fb172a64d9c2 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Dirk Farin <dirk.farin@gmail.com> | ||
| 3 | Date: Tue, 9 Sep 2025 15:14:05 +0200 | ||
| 4 | Subject: [PATCH] check for valid integer command line parameters (#484) | ||
| 5 | |||
| 6 | OE comment: | ||
| 7 | This is a partial backport of the below mentioned patch, without raising | ||
| 8 | the required c++ standard. | ||
| 9 | |||
| 10 | CVE: CVE-2025-61147 | ||
| 11 | Upstream-Status: Backport [https://github.com/strukturag/libde265/commit/8b17e0930f77db07f55e0b89399a8f054ddbecf7] | ||
| 12 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 13 | --- | ||
| 14 | dec265/dec265.cc | 35 ++++++++++++++++++++++++++++++++--- | ||
| 15 | 1 file changed, 32 insertions(+), 3 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/dec265/dec265.cc b/dec265/dec265.cc | ||
| 18 | index 79f67cd3..c38b0715 100644 | ||
| 19 | --- a/dec265/dec265.cc | ||
| 20 | +++ b/dec265/dec265.cc | ||
| 21 | @@ -27,6 +27,9 @@ | ||
| 22 | #define DO_MEMORY_LOGGING 0 | ||
| 23 | |||
| 24 | #include "de265.h" | ||
| 25 | +#include <stdexcept> | ||
| 26 | +#include <iostream> | ||
| 27 | + | ||
| 28 | #ifdef HAVE_CONFIG_H | ||
| 29 | #include "config.h" | ||
| 30 | #endif | ||
| 31 | @@ -562,6 +565,32 @@ void (*volatile __malloc_initialize_hook)(void) = init_my_hooks; | ||
| 32 | #endif | ||
| 33 | #endif | ||
| 34 | |||
| 35 | +int parse_param(const char* arg, int lower_bound, const char* arg_name){ | ||
| 36 | + int value; | ||
| 37 | + | ||
| 38 | + try { | ||
| 39 | + size_t len; | ||
| 40 | + value = std::stoi(optarg, &len); | ||
| 41 | + if (arg[len] != 0) { | ||
| 42 | + std::cerr << "invalid argument to " << arg_name << "\n"; | ||
| 43 | + exit(5); | ||
| 44 | + } | ||
| 45 | + } catch (std::invalid_argument const& ex) { | ||
| 46 | + std::cerr << "invalid argument to " << arg_name << "\n"; | ||
| 47 | + exit(5); | ||
| 48 | + } | ||
| 49 | + catch (std::out_of_range const& ex) { | ||
| 50 | + std::cerr << "argument to -T is out of range\n"; | ||
| 51 | + exit(5); | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + if (value < lower_bound) { | ||
| 55 | + std::cerr << "argument to " << arg_name << " may not be smaller than " << lower_bound << "\n"; | ||
| 56 | + exit(5); | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + return value; | ||
| 60 | +} | ||
| 61 | |||
| 62 | int main(int argc, char** argv) | ||
| 63 | { | ||
| 64 | @@ -578,9 +607,9 @@ int main(int argc, char** argv) | ||
| 65 | |||
| 66 | switch (c) { | ||
| 67 | case 'q': quiet++; break; | ||
| 68 | - case 't': nThreads=atoi(optarg); break; | ||
| 69 | + case 't': nThreads=parse_param(optarg, 0, "-t"); break; | ||
| 70 | case 'c': check_hash=true; break; | ||
| 71 | - case 'f': max_frames=atoi(optarg); break; | ||
| 72 | + case 'f': max_frames=parse_param(optarg, 1, "-f"); break; | ||
| 73 | case 'o': write_yuv=true; output_filename=optarg; break; | ||
| 74 | case 'h': show_help=true; break; | ||
| 75 | case 'd': dump_headers=true; break; | ||
| 76 | @@ -592,7 +621,7 @@ int main(int argc, char** argv) | ||
| 77 | case 'm': measure_quality=true; reference_filename=optarg; break; | ||
| 78 | case 's': show_ssim_map=true; break; | ||
| 79 | case 'e': show_psnr_map=true; break; | ||
| 80 | - case 'T': highestTID=atoi(optarg); break; | ||
| 81 | + case 'T': highestTID = parse_param(optarg, 0, "-T"); break; | ||
| 82 | case 'v': verbosity++; break; | ||
| 83 | } | ||
| 84 | } | ||
diff --git a/meta-multimedia/recipes-multimedia/libde265/libde265_1.0.16.bb b/meta-multimedia/recipes-multimedia/libde265/libde265_1.0.16.bb index 3e3381b646..2676de5c2e 100644 --- a/meta-multimedia/recipes-multimedia/libde265/libde265_1.0.16.bb +++ b/meta-multimedia/recipes-multimedia/libde265/libde265_1.0.16.bb | |||
| @@ -8,7 +8,9 @@ LICENSE = "LGPL-3.0-only & MIT" | |||
| 8 | LICENSE_FLAGS = "commercial" | 8 | LICENSE_FLAGS = "commercial" |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=695b556799abb2435c97a113cdca512f" | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=695b556799abb2435c97a113cdca512f" |
| 10 | 10 | ||
| 11 | SRC_URI = "git://github.com/strukturag/libde265.git;branch=master;protocol=https;tag=v${PV}" | 11 | SRC_URI = "git://github.com/strukturag/libde265.git;branch=master;protocol=https;tag=v${PV} \ |
| 12 | file://CVE-2025-61147.patch \ | ||
| 13 | " | ||
| 12 | SRCREV = "7ba65889d3d6d8a0d99b5360b028243ba843be3a" | 14 | SRCREV = "7ba65889d3d6d8a0d99b5360b028243ba843be3a" |
| 13 | 15 | ||
| 14 | 16 | ||
