소스 검색

msm: ADSPRPC: Handle potential leak information

Memset the entire header buffer to fix potential
leak information for Cached buffers.

Signed-off-by: nishant chaubey <[email protected]>
nishant chaubey 2 년 전
부모
커밋
f093a3613d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      dsp/adsprpc.c

+ 1 - 1
dsp/adsprpc.c

@@ -2363,7 +2363,7 @@ static int get_args(uint32_t kernel, struct smq_invoke_ctx *ctx)
 		VERIFY(err, !IS_ERR_OR_NULL(ctx->buf->virt));
 		if (err)
 			goto bail;
-		memset(ctx->buf->virt, 0, metalen);
+		memset(ctx->buf->virt, 0, ctx->buf->size);
 	}
 	ctx->used = metalen;