misc: fastrpc: Fix memory leak in audio daemon attach operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ekansh Gupta <quic_ekangupt@xxxxxxxxxxx>

commit ad0bd973a033003ca578c42a760d1dc77aeea15e upstream.

Audio PD daemon send the name as part of the init IOCTL call. This
name needs to be copied to kernel for which memory is allocated.
This memory is never freed which might result in memory leak. Free
the memory when it is not needed.

Fixes: 0871561055e6 ("misc: fastrpc: Add support for audiopd")
Cc: stable <stable@xxxxxxxxxx>
Signed-off-by: Ekansh Gupta <quic_ekangupt@xxxxxxxxxxx>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20240628114501.14310-5-srinivas.kandagatla@xxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/misc/fastrpc.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -1320,6 +1320,7 @@ static int fastrpc_init_create_static_pr
 		goto err_invoke;
 
 	kfree(args);
+	kfree(name);
 
 	return 0;
 err_invoke:


Patches currently in stable-queue which might be from quic_ekangupt@xxxxxxxxxxx are

queue-6.9/misc-fastrpc-fix-memory-leak-in-audio-daemon-attach-operation.patch
queue-6.9/misc-fastrpc-avoid-updating-pd-type-for-capability-request.patch
queue-6.9/misc-fastrpc-restrict-untrusted-app-to-attach-to-privileged-pd.patch
queue-6.9/misc-fastrpc-fix-dsp-capabilities-request.patch
queue-6.9/misc-fastrpc-fix-ownership-reassignment-of-remote-heap.patch
queue-6.9/misc-fastrpc-copy-the-complete-capability-structure-to-user.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux