CVE-2019-17041
rsyslog: heap-based overflow in contrib/pmaixforwardedfrom/pmaixforwardedfrom.c
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
1Exploited in Wild
-Decision
Descriptions
An issue was discovered in Rsyslog v8.1908.0. contrib/pmaixforwardedfrom/pmaixforwardedfrom.c has a heap overflow in the parser for AIX log messages. The parser tries to locate a log message delimiter (in this case, a space or a colon) but fails to account for strings that do not satisfy this constraint. If the string does not match, then the variable lenMsg will reach the value zero and will skip the sanity check that detects invalid log messages. The message will then be considered valid, and the parser will eat up the nonexistent colon delimiter. In doing so, it will decrement lenMsg, a signed integer, whose value was zero and now becomes minus one. The following step in the parser is to shift left the contents of the message. To do this, it will call memmove with the right pointers to the target and destination strings, but the lenMsg will now be interpreted as a huge value, causing a heap overflow.
Se detectó un problema en Rsyslog versión v8.1908.0. El archivo contrib/pmaixforwardsfrom/pmaixforwardsfrom.c presenta un desbordamiento de la pila en el analizador para mensajes de registro de AIX. El analizador intenta localizar un delimitador de mensaje de registro (en este caso, un espacio o dos puntos) pero no considera las cadenas que no satisfacen esta restricción. Si la cadena no coincide, la variable lenMsg alcanzará el valor cero y omitirá la comprobación de saneamiento que detecta mensajes de registro no válidos. El mensaje entonces se considerará válido y el analizador consumirá el delimitador de dos puntos inexistentes. Al hacerlo, disminuirá lenMsg, un entero con signo, cuyo valor era cero y ahora se convierte en menos uno. El siguiente paso en el analizador es desplazar a la izquierda el contenido del mensaje. Para hacer esto, llamará a memmove con los punteros correctos para las cadenas de destino y apuntadas, pero el lenMsg ahora será interpretado como un gran valor, causando un desbordamiento de la pila.
CVSS Scores
SSVC
- Decision:-
Timeline
- 2019-09-30 CVE Reserved
- 2019-10-07 CVE Published
- 2020-12-05 First Exploit
- 2024-08-05 CVE Updated
- 2024-09-30 EPSS Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
CWE
- CWE-122: Heap-based Buffer Overflow
- CWE-787: Out-of-bounds Write
CAPEC
References (10)
URL | Tag | Source |
---|---|---|
https://github.com/rsyslog/rsyslog/blob/v8-stable/ChangeLog | Release Notes | |
https://lists.debian.org/debian-lts-announce/2021/11/msg00030.html | Mailing List |
URL | Date | SRC |
---|---|---|
https://github.com/Resery/CVE-2019-17041 | 2020-12-05 |
URL | Date | SRC |
---|---|---|
https://github.com/rsyslog/rsyslog/pull/3884 | 2023-11-07 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Rsyslog Search vendor "Rsyslog" | Rsyslog Search vendor "Rsyslog" for product "Rsyslog" | 8.1908.0 Search vendor "Rsyslog" for product "Rsyslog" and version "8.1908.0" | - |
Affected
| ||||||
Debian Search vendor "Debian" | Debian Linux Search vendor "Debian" for product "Debian Linux" | 9.0 Search vendor "Debian" for product "Debian Linux" and version "9.0" | - |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 30 Search vendor "Fedoraproject" for product "Fedora" and version "30" | - |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 31 Search vendor "Fedoraproject" for product "Fedora" and version "31" | - |
Affected
| ||||||
Opensuse Search vendor "Opensuse" | Leap Search vendor "Opensuse" for product "Leap" | 15.0 Search vendor "Opensuse" for product "Leap" and version "15.0" | - |
Affected
| ||||||
Opensuse Search vendor "Opensuse" | Leap Search vendor "Opensuse" for product "Leap" | 15.1 Search vendor "Opensuse" for product "Leap" and version "15.1" | - |
Affected
|