Re: [PATCH net] sctp: free cmd->obj.chunk for the unprocessed SCTP_CMD_REPLY

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

 



From: Xin Long <lucien.xin@xxxxxxxxx>
Date: Sat,  4 Jan 2020 14:15:02 +0800

> This patch is to fix a memleak caused by no place to free cmd->obj.chunk
> for the unprocessed SCTP_CMD_REPLY. This issue occurs when failing to
> process a cmd while there're still SCTP_CMD_REPLY cmds on the cmd seq
> with an allocated chunk in cmd->obj.chunk.
> 
> So fix it by freeing cmd->obj.chunk for each SCTP_CMD_REPLY cmd left on
> the cmd seq when any cmd returns error. While at it, also remove 'nomem'
> label.
> 
> Reported-by: syzbot+107c4aff5f392bf1517f@xxxxxxxxxxxxxxxxxxxxxxxxx
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Xin Long <lucien.xin@xxxxxxxxx>

Applied and queued up for -stable.




[Index of Archives]     [Linux Networking Development]     [Linux OMAP]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux