* [PATCH] libtirpc: Fix use-after-free accessing the error number
@ 2022-01-13 19:36 Frank Sorenson
2022-01-20 16:00 ` Steve Dickson
0 siblings, 1 reply; 2+ messages in thread
From: Frank Sorenson @ 2022-01-13 19:36 UTC (permalink / raw)
To: libtirpc-devel; +Cc: linux-nfs, sorenson
Free the cbuf after obtaining the error number.
Signed-off-by: Frank Sorenson <sorenson@redhat.com>
---
src/clnt_dg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/clnt_dg.c b/src/clnt_dg.c
index e1255de..b3d82e7 100644
--- a/src/clnt_dg.c
+++ b/src/clnt_dg.c
@@ -456,9 +456,9 @@ get_reply:
cmsg = CMSG_NXTHDR (&msg, cmsg))
if (cmsg->cmsg_level == SOL_IP && cmsg->cmsg_type == IP_RECVERR)
{
- mem_free(cbuf, (outlen + 256));
e = (struct sock_extended_err *) CMSG_DATA(cmsg);
cu->cu_error.re_errno = e->ee_errno;
+ mem_free(cbuf, (outlen + 256));
release_fd_lock(cu->cu_fd_lock, mask);
return (cu->cu_error.re_status = RPC_CANTRECV);
}
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libtirpc: Fix use-after-free accessing the error number
2022-01-13 19:36 [PATCH] libtirpc: Fix use-after-free accessing the error number Frank Sorenson
@ 2022-01-20 16:00 ` Steve Dickson
0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2022-01-20 16:00 UTC (permalink / raw)
To: Frank Sorenson, libtirpc-devel; +Cc: linux-nfs
On 1/13/22 14:36, Frank Sorenson wrote:
> Free the cbuf after obtaining the error number.
>
> Signed-off-by: Frank Sorenson <sorenson@redhat.com>
Committed (tag: libtirpc-1-3-3-rc2)
steved.
> ---
> src/clnt_dg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/clnt_dg.c b/src/clnt_dg.c
> index e1255de..b3d82e7 100644
> --- a/src/clnt_dg.c
> +++ b/src/clnt_dg.c
> @@ -456,9 +456,9 @@ get_reply:
> cmsg = CMSG_NXTHDR (&msg, cmsg))
> if (cmsg->cmsg_level == SOL_IP && cmsg->cmsg_type == IP_RECVERR)
> {
> - mem_free(cbuf, (outlen + 256));
> e = (struct sock_extended_err *) CMSG_DATA(cmsg);
> cu->cu_error.re_errno = e->ee_errno;
> + mem_free(cbuf, (outlen + 256));
> release_fd_lock(cu->cu_fd_lock, mask);
> return (cu->cu_error.re_status = RPC_CANTRECV);
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-20 16:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13 19:36 [PATCH] libtirpc: Fix use-after-free accessing the error number Frank Sorenson
2022-01-20 16:00 ` Steve Dickson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.