netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* inet_diag insufficient validation?
@ 2011-06-01 15:40 Dan Rosenberg
  2011-06-01 15:50 ` Dan Rosenberg
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Dan Rosenberg @ 2011-06-01 15:40 UTC (permalink / raw)
  To: davem, kuznet; +Cc: netdev, security

It seems to me that the auditing performed by inet_diag_bc_audit() is
insufficient to prevent pathological INET_DIAG bytecode from doing bad
things.

Firstly, it's possible to cause an infinite loop in inet_diag_bc_audit()
with a INET_DIAG_BC_JMP opcode with a "yes" value of 0.  The valid_cc()
function, also called from here, seems suspicious as well.

Once the bytecode is actually run in inet_diag_bc_run(), it looks like
more infinite loops are possible, if appropriate "yes" or "no" values
are set to zero and weren't validated by the audit.

Finally, I can't seem to find any validation that the reported length of
the netlink message header doesn't exceed the skb length, as checked in
some other netlink receive functions, which could result in reading
beyond the bounds of the socket data.  I could just be missing something
here though.

Regards,
Dan


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

end of thread, other threads:[~2011-06-17 20:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-01 15:40 inet_diag insufficient validation? Dan Rosenberg
2011-06-01 15:50 ` Dan Rosenberg
2011-06-03  0:50 ` Dan Rosenberg
2011-06-03  6:55 ` [Security] " Eugene Teo
2011-06-15 14:35   ` Dan Rosenberg
2011-06-17 20:19   ` [PATCH] inet_diag: fix inet_diag_bc_audit() Eric Dumazet
2011-06-17 20:26     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).