inet_diag: Make sure we actually run the same bytecode we audited.
authorNelson Elhage <nelhage@ksplice.com>
Wed, 3 Nov 2010 16:35:41 +0000 (16:35 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Nov 2010 19:26:34 +0000 (12:26 -0700)
We were using nlmsg_find_attr() to look up the bytecode by attribute when
auditing, but then just using the first attribute when actually running
bytecode. So, if we received a message with two attribute elements, where only
the second had type INET_DIAG_REQ_BYTECODE, we would validate and run different
bytecode strings.

Fix this by consistently using nlmsg_find_attr everywhere.

Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Signed-off-by: Thomas Graf <tgraf@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found