]> git.baikalelectronics.ru Git - kernel.git/commit
svcrpc: fix handling of garbage args
authorJ. Bruce Fields <bfields@citi.umich.edu>
Thu, 3 Jul 2008 19:26:35 +0000 (15:26 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Jul 2008 19:46:56 +0000 (12:46 -0700)
commite16fdbe6cd4e3cbaba07391aaf013ab9a814a6d2
treea91c96f8200904a0fe4224f05a43698b2f8cb4cb
parent22cc9e9096eaa97c35bdbc1c436838c077934dd5
svcrpc: fix handling of garbage args

To return garbage_args, the accept_stat must be 0, and we must have a
verifier.  So we shouldn't be resetting the write pointer as we reject
the call.

Also, we must add the two placeholder words here regardless of success
of the unwrap, to ensure the output buffer is left in a consistent state
for svcauth_gss_release().

This fixes a BUG() in svcauth_gss.c:svcauth_gss_release().

Thanks to Aime Le Rouzic for bug report, debugging help, and testing.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Tested-by: Aime Le Rouzic <aime.le-rouzic@bull.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
net/sunrpc/auth_gss/svcauth_gss.c