DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] add hardening checks to cmdline and cfgfile libs
@ 2026-05-07 14:59 Bruce Richardson
  2026-05-07 14:59 ` [PATCH 1/6] cfgfile: add null checks to public APIs Bruce Richardson
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Bruce Richardson @ 2026-05-07 14:59 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

Using AI tools to review the cmdline and cfgfile libraries throws up a
couple of places in the libraries where additional hardening could help
prevent future issues. A number of these are purely defensive, e.g.
adding NULL checks to input parameters where a well-behaved app should
never call the function with a NULL value, and so those are not
explicitly marked for backport.

Bruce Richardson (6):
  cfgfile: add null checks to public APIs
  cfgfile: prevent issues with overflow on resize
  cmdline: harden parser result buffer handling
  cmdline: add explicit help function for bool type
  cmdline: guard zero-size destination buffers
  cmdline: add null checks for invalid input

 lib/cfgfile/rte_cfgfile.c          | 118 ++++++++++++++++++++---------
 lib/cmdline/cmdline.c              |   3 +
 lib/cmdline/cmdline_parse.c        |   6 +-
 lib/cmdline/cmdline_parse_bool.c   |  37 ++++++++-
 lib/cmdline/cmdline_parse_num.c    |   2 +-
 lib/cmdline/cmdline_parse_string.c |   3 +
 lib/cmdline/cmdline_rdline.c       |   3 +
 7 files changed, 128 insertions(+), 44 deletions(-)

--
2.51.0


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [PATCH 6/6] cmdline: add null checks for invalid input
@ 2026-05-07 22:25 Alex Michael
  2026-05-08  7:41 ` Bruce Richardson
  0 siblings, 1 reply; 9+ messages in thread
From: Alex Michael @ 2026-05-07 22:25 UTC (permalink / raw)
  To: bruce.richardson; +Cc: dev

pmd_buffer_scatter test suite failed on Ubuntu 24.04 LTS with an Intel XL710 40GbE NIC. Conversely it didn’t fail on Ubuntu 22.04 with an Intel E810 NIC, so the issue lies either with the OS (mbuf size or mempool configuration mismatch / buffer handling logic), the NIC (driver-level bug), the interaction between them or the test suite itself (as it should be unrelated to NULL conditionals).

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-05-12  7:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07 14:59 [PATCH 0/6] add hardening checks to cmdline and cfgfile libs Bruce Richardson
2026-05-07 14:59 ` [PATCH 1/6] cfgfile: add null checks to public APIs Bruce Richardson
2026-05-07 14:59 ` [PATCH 2/6] cfgfile: prevent issues with overflow on resize Bruce Richardson
2026-05-07 14:59 ` [PATCH 3/6] cmdline: harden parser result buffer handling Bruce Richardson
2026-05-07 14:59 ` [PATCH 4/6] cmdline: add explicit help function for bool type Bruce Richardson
2026-05-07 14:59 ` [PATCH 5/6] cmdline: guard zero-size destination buffers Bruce Richardson
2026-05-07 14:59 ` [PATCH 6/6] cmdline: add null checks for invalid input Bruce Richardson
  -- strict thread matches above, loose matches on Subject: below --
2026-05-07 22:25 Alex Michael
2026-05-08  7:41 ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox