diff options
| -rw-r--r-- | meta-webserver/recipes-support/fcgi/fcgi/CVE-2025-23016.patch | 40 | ||||
| -rw-r--r-- | meta-webserver/recipes-support/fcgi/fcgi_git.bb | 1 |
2 files changed, 41 insertions, 0 deletions
diff --git a/meta-webserver/recipes-support/fcgi/fcgi/CVE-2025-23016.patch b/meta-webserver/recipes-support/fcgi/fcgi/CVE-2025-23016.patch new file mode 100644 index 0000000000..b763d7651c --- /dev/null +++ b/meta-webserver/recipes-support/fcgi/fcgi/CVE-2025-23016.patch | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | From b0eabcaf4d4f371514891a52115c746815c2ff15 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Pycatchown <39068868+Pycatchown@users.noreply.github.com> | ||
| 3 | Date: Tue, 8 Apr 2025 17:39:30 +0200 | ||
| 4 | Subject: [PATCH] Update fcgiapp.c | ||
| 5 | |||
| 6 | Fixing an integer overflow (CVE-2025-23016) | ||
| 7 | |||
| 8 | CVE: CVE-2025-23016 | ||
| 9 | Upstream-Status: Backport [https://github.com/FastCGI-Archives/fcgi2/commit/b0eabcaf4d4f371514891a52115c746815c2ff15] | ||
| 10 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 11 | --- | ||
| 12 | libfcgi/fcgiapp.c | 8 ++++++++ | ||
| 13 | 1 file changed, 8 insertions(+) | ||
| 14 | |||
| 15 | diff --git a/libfcgi/fcgiapp.c b/libfcgi/fcgiapp.c | ||
| 16 | index 4ffe318..99c3630 100644 | ||
| 17 | --- a/libfcgi/fcgiapp.c | ||
| 18 | +++ b/libfcgi/fcgiapp.c | ||
| 19 | @@ -1173,6 +1173,10 @@ static int ReadParams(Params *paramsPtr, FCGX_Stream *stream) | ||
| 20 | } | ||
| 21 | nameLen = ((nameLen & 0x7f) << 24) + (lenBuff[0] << 16) | ||
| 22 | + (lenBuff[1] << 8) + lenBuff[2]; | ||
| 23 | + if (nameLen >= INT_MAX) { | ||
| 24 | + SetError(stream, FCGX_PARAMS_ERROR); | ||
| 25 | + return -1; | ||
| 26 | + } | ||
| 27 | } | ||
| 28 | if((valueLen = FCGX_GetChar(stream)) == EOF) { | ||
| 29 | SetError(stream, FCGX_PARAMS_ERROR); | ||
| 30 | @@ -1185,6 +1189,10 @@ static int ReadParams(Params *paramsPtr, FCGX_Stream *stream) | ||
| 31 | } | ||
| 32 | valueLen = ((valueLen & 0x7f) << 24) + (lenBuff[0] << 16) | ||
| 33 | + (lenBuff[1] << 8) + lenBuff[2]; | ||
| 34 | + if (valueLen >= INT_MAX) { | ||
| 35 | + SetError(stream, FCGX_PARAMS_ERROR); | ||
| 36 | + return -1; | ||
| 37 | + } | ||
| 38 | } | ||
| 39 | /* | ||
| 40 | * nameLen and valueLen are now valid; read the name and value | ||
diff --git a/meta-webserver/recipes-support/fcgi/fcgi_git.bb b/meta-webserver/recipes-support/fcgi/fcgi_git.bb index 61ef6073e0..d327d435d5 100644 --- a/meta-webserver/recipes-support/fcgi/fcgi_git.bb +++ b/meta-webserver/recipes-support/fcgi/fcgi_git.bb | |||
| @@ -7,6 +7,7 @@ SRCREV = "382aa2b0d53a87c27f2f647dfaf670375ba0b85f" | |||
| 7 | PV = "2.4.2" | 7 | PV = "2.4.2" |
| 8 | 8 | ||
| 9 | SRC_URI = "git://github.com/FastCGI-Archives/fcgi2.git;protocol=https;branch=master \ | 9 | SRC_URI = "git://github.com/FastCGI-Archives/fcgi2.git;protocol=https;branch=master \ |
| 10 | file://CVE-2025-23016.patch \ | ||
| 10 | " | 11 | " |
| 11 | 12 | ||
| 12 | S = "${WORKDIR}/git" | 13 | S = "${WORKDIR}/git" |
