Skip to content

net: validate HWTSTAMP ioctl parameters

Richard Cochran netdev 1 version Applied

Status from this message: Applied, thanks again Richard.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/1net: validate HWTSTAMP ioctl parametersinclude/linux/net_tstamp.h net/core/dev.c+60 -23 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/1] net: validate HWTSTAMP ioctl parameters

Okay, here is a patch to check the ioctl.

I took the liberty to check both the Rx and Tx fields. I coded the check rather pedantically, using a switch/case over the enumerated values. The advantage of this style is that the compiler will warn if someone adds a new enum into net_tstamp.h without fixing the checking function in dev.c.

Richard Cochran (1):
net: validate HWTSTAMP ioctl parameters

 include/linux/net_tstamp.h |    4 +-
 net/core/dev.c             |   58 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.2.5