in_syslog: PRI values above 191 are accepted and the tag gets an empty facility
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 74/100
Línea de trabajo
Empieza en lib/fluent/plugin/in_syslog.rb, en la asignación de PRI a etiqueta mencionada en el issue, y sigue cómo se analiza PRI tanto con la configuración predeterminada como con with_priority false. Revisa las pruebas existentes para mensajes syslog no válidos y añade cobertura para valores de PRI superiores a 191 en ambos modos. La tarea estará terminada cuando los valores de PRI no válidos generen advertencias y no se emitan, mientras que el PRI válido 191 siga funcionando.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
in_syslog builds the tag from FACILITY_MAP[pri >> 3] and SEVERITY_MAP[pri & 0b111]. It does not check that PRI is in the valid range 0 to 191. For a larger PRI, the facility is nil, and the tag gets an empty part.
https://github.com/fluent/fluentd/blob/e7d3c3e4/lib/fluent/plugin/in_syslog.rb#L325
- With the default parse settings (
with_priority true),<200>is emitted with the tagsyslog..emerg. (<1234>is rejected, because the parser reads at most 3 digits.) - With
with_priority false, in_syslog reads PRI withSYSLOG_REGEXP([0-9]+).<200>givessyslog..emerg, and<1234>givessyslog..crit.
To Reproduce
Run Fluentd with the configuration below. Then send these messages:
ruby -rsocket -e 'u = UDPSocket.new; ["<200>Apr 25 16:43:29 host app: msg", "<1234>Apr 25 16:43:29 host app: msg", "<191>Apr 25 16:43:29 host app: msg"].each { |m| u.send(m, 0, "127.0.0.1", 5140) }'
Output on master (e7d3c3e4) with the default parse settings:
2026-04-25 16:43:29.000000000 +0900 syslog..emerg: {"host":"host","ident":"app","message":"msg"}
[warn]: failed to parse message data="<1234>Apr 25 16:43:29 host app: msg"
2026-04-25 16:43:29.000000000 +0900 syslog.local7.debug: {"host":"host","ident":"app","message":"msg"}
Output with with_priority false in <parse>:
2026-04-25 16:43:29.000000000 +0900 syslog..emerg: {"host":"host","ident":"app","message":"msg"}
2026-04-25 16:43:29.000000000 +0900 syslog..crit: {"host":"host","ident":"app","message":"msg"}
2026-04-25 16:43:29.000000000 +0900 syslog.local7.debug: {"host":"host","ident":"app","message":"msg"}
Expected behavior
A PRI outside 0 to 191 is treated as invalid, as RFC 5424 defines this range. in_syslog warns and does not emit it with a broken tag, like other invalid messages.
Your Environment
- Fluentd version: master (e7d3c3e4). v1.20.1 and v1.19.4 have the same code (not run).
- Package version: -
- Operating system: Linux
- Kernel version: -
Your Configuration
<source>
@type syslog
port 5140
bind 127.0.0.1
tag syslog
# For the second case:
# <parse>
# @type syslog
# with_priority false
# </parse>
</source>
<match syslog.**>
@type stdout
</match>
Your Error Log
No error is logged for <200>.
- Lenguaje dominante
- Ruby
- Estrellas
- 13.6k
- Forks
- 1.4k
- Merge medio
- 17 h 28 min
- PR fusionados (30 d)
- 66
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de fluent/fluentd
-
parser_syslog: message_format auto parses RFC 3164 messages with an RFC 3339 timestamp as RFC 5424Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
Los mantenedores suelen responder en 1 día
-
out_forward: unacknowledged chunks are resent forever with heartbeat_type none, ignoring retry limits and secondaryPosiblemente ocupada @SahinurDEV la tomó hace 1 día. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 74/100
fluent/fluentd#5619 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
A label looked up at runtime during a graceful reload can keep dropping the events of a tagPosiblemente ocupada @sarankumar1325 la tomó hoy. Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
Los mantenedores suelen responder en 1 día
Todos los issues de fluent/fluentd
Issues similares
-
Websockify heartbeat for vnc_containerPosiblemente ocupada @robinkar la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
needs verification
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 7 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
akitaonrails/ai-book-2026#13 ·
-
Mend: dependency security vulnerability
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
Los mantenedores suelen responder en 1 día
-
Prism::Translation::Parser raises NoMethodError for a method with a &nil parameter and a bodyPosiblemente ocupada @bbatsov la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día