svc_getargs(): Should not be freeing arg pointers on failures
Subsystems (2)
PATCH 1/1 svc_getargs(): Should not be freeing arg pointers on failures
commit 82cc2e61 (SVCAUTH_WRAP/SVCAUTH_UNWRAP) introduce a regression that causes callers of svc_getargs() to crash when svc_freeargs() frees args points that are allocated on the stack.
svc_getargs() should let the callers do the freeing and not make any assumptions on the type of memory passed in.
Also see:
https://bugzilla.redhat.com/show_bug.cgi?id=948378
and
CVE-2013-1950 EMBARGOED rpcbind: invalid pointer free leads to crash
--- src/svc_dg.c | 1 - 1 file changed, 1 deletion(-)
src/svc_dg.c +0 -1
@@ -284,7 +284,6 @@ svc_dg_getargs(xprt, xdr_args, args_ptr) {if (!SVCAUTH_UNWRAP (xprt->xp_auth, &(su_data (xprt)->su_xdrs), xdr_args, args_ptr)) { - (void )svc_freeargs (xprt, xdr_args, args_ptr);return FALSE; }return TRUE;
Signature · 1 line
1.8.1.4
Quoted 7 lines · Steve Dickson
commit
82cc2e61(SVCAUTH_WRAP/SVCAUTH_UNWRAP) introduce a regression that causes callers ofsvc_getargs()to crash whensvc_freeargs()frees args points that are allocated on the stack.
svc_getargs()should let the callers do the freeing and not make any assumptions on the type of memory passed in.
Quoted 6 lines
Also see:
https://bugzilla.redhat.com/show_bug.cgi?id=948378and
CVE-2013-1950 EMBARGOED rpcbind: invalid pointer free leads to crashSigned-off-by Steve Dickson <[email protected]>
Committed...
steved.
Quoted 17 lines
--- src/svc_dg.c | 1 - 1 file changed, 1 deletion(-)src/svc_dg.c +0
-1@@ -284,7 +284,6 @@ svc_dg_getargs(xprt, xdr_args, args_ptr) {if (!SVCAUTH_UNWRAP (xprt->xp_auth, &(su_data (xprt)->su_xdrs), xdr_args, args_ptr)) { - (void )svc_freeargs (xprt, xdr_args, args_ptr);return FALSE; }return TRUE;