tracing: Bound synthetic-field strings with seq_buf
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 02205a6752f223779a1b0e9e8ffacbea6e717851 · < f07883450eb14d1cf020b55d9f3a7ec5683bcd26| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
tracing: Bound synthetic-field strings with seq_buf
The synthetic field helpers build a prefixed synthetic variable name and a generated hist command in fixed MAX_FILTER_STR_VAL buffers. The current code appends those strings with raw strcat(), so long key lists, field names, or saved filters can run past the end of the staging buffers.
Build both strings with seq_buf and propagate -E2BIG if either the synthetic variable name or the generated command exceeds MAX_FILTER_STR_VAL. This keeps the existing tracing-side limit while using the helper intended for bounded command construction.
[ sdr: Moved struct seq_buf *s for upside-down x-mas tree formatting ]
From the CVE record · Linux
Linux kernel tracing helpers can write past fixed-size buffers when building synthetic variable names or generated hist commands from long key lists, field names, or saved filters. The input does not specify how an attacker could reach this code or whether access or user interaction is required.
Engineers running the Linux kernel should check their kernel version; affected versions are not specified.