don't build printf formats out of names
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | lib: don't build printf formats out of nameslib/ | +2 | 0 replies | |
| 2/3 | rdma: don't build printf formats out of keysrdma/ rdma/ rdma/ | +9 | 1 reply | |
| 3/3 | vdpa: don't build printf format out of vendor stats namevdpa/ | +3 | 0 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Leon Romanovsky |
|---|---|
| 1/3 | |
| 2/3 | R-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH iproute2 0/3] don't build printf formats out of names
Several print helpers built a printf format string by concatenating a name or key onto a conversion specifier, then passed the result to printf as the format. This is unsafe since '%' in name would be converted by printf.
Most of the affected names are string literals, but the rdma driver attribute and hwcounter keys and the vdpa vendor statistics names come from the kernel, so they are not under iproute2's control. No failures have been reported in practice. Each patch passes the name as a normal string argument with a literal format instead; text and JSON output are otherwise unchanged.
Found by an automated source scan (ANT-2026-JAWA8082).
Stephen Hemminger (3):
lib: don't build printf formats out of names
rdma: don't build printf formats out of keys
vdpa: don't build printf format out of vendor stats name
lib/json_print.c | 7 ++----- rdma/res-cmid.c | 3 ++- rdma/res.c | 10 +++++----- rdma/utils.c | 4 ++-- vdpa/vdpa.c | 14 +++----------- 5 files changed, 14 insertions(+), 24 deletions(-)
Signature · 1 line
2.53.0