fbdev: msm: Avoid UAF in mdss_dsi_cmd_write
In mdss_dsi_cmd_write, a failure in copying the cmds to 'string_buf' can cause an early return. In this case, the 'pcmds->string_buf' won't be pointing to a valid buffer. This can lead to use-after-free and memory leak. To avoid this, assign the newly allocated buffer to 'pcmds->string_buf' after returning from krealloc call. Change-Id: I286f12c86078d1989cb09453c8a395a4ad94b324 Signed-off-by:Nirmal Abraham <nabrah@codeaurora.org> Signed-off-by:
Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
Loading
Please register or sign in to comment