All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] net/zxdh: fix issues reported by GCC analyzer
@ 2026-11-28  4:04 Junlong Wang
  2026-11-28  4:04 ` [PATCH v1 1/2] net/zxdh: bound resource table reply length before copying Junlong Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Junlong Wang @ 2026-11-28  4:04 UTC (permalink / raw)
  To: stephen; +Cc: dev, Junlong Wang


[-- Attachment #1.1.1: Type: text/plain, Size: 904 bytes --]

Two memory safety issues in the zxdh driver, both found with
gcc -fanalyzer:

- zxdh_get_res_info() copies a reply length taken from the device into
  a caller buffer whose size it is not told. Both callers pass a
  one-byte object, so an oversized length overwrites their stack, and
  a length above the receive buffer size also overruns that buffer
  (patch 1).
- fd_flow_parse_pattern() and fd_flow_parse_action() allocate a flow
  entry when rte_flow_validate() passes dh_flow as NULL, and free it
  on only one exit, so every validate leaks memory (patch 2).

Junlong Wang (2):
  net/zxdh: bound resource table reply length before copying
  net/zxdh: avoid leaking flow entry on validation

 drivers/net/zxdh/zxdh_common.c | 24 ++++++++++----
 drivers/net/zxdh/zxdh_flow.c   | 58 ++++++++++------------------------
 2 files changed, 33 insertions(+), 49 deletions(-)

-- 
2.27.0

[-- Attachment #1.1.2: Type: text/html , Size: 1634 bytes --]

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

end of thread, other threads:[~2026-12-01  0:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-28  4:04 [PATCH v1 0/2] net/zxdh: fix issues reported by GCC analyzer Junlong Wang
2026-11-28  4:04 ` [PATCH v1 1/2] net/zxdh: bound resource table reply length before copying Junlong Wang
2026-12-01  0:26   ` Stephen Hemminger
2026-11-28  4:04 ` [PATCH v1 2/2] net/zxdh: avoid leaking flow entry on validation Junlong Wang
2026-12-01  0:33 ` [PATCH v1 0/2] net/zxdh: fix issues reported by GCC analyzer Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.