Re: [PATCH] sctp: relese sctp_stream_priorities at sctp_stream_outq_migrate()

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


On 2022/11/23 22:57, Marcelo Ricardo Leitner wrote:
> On Wed, Nov 23, 2022 at 07:36:00PM +0900, Tetsuo Handa wrote:
>> syzbot is reporting memory leak on sctp_stream_priorities [1], for
>> sctp_stream_outq_migrate() is resetting SCTP_SO(stream, i)->ext to NULL
>> without clearing SCTP_SO(new, i)->ext->prio_head list allocated by
>> sctp_sched_prio_new_head(). Since sctp_sched_prio_free() is too late to
>> clear if stream->outcnt was already shrunk or SCTP_SO(stream, i)->ext
>> was already NULL, add a callback for clearing that list before shrinking
>> stream->outcnt and/or resetting SCTP_SO(stream, i)->ext.
>> Link: [1]
>> Reported-by: syzbot <syzbot+29c402e56c4760763cc0@xxxxxxxxxxxxxxxxxxxxxxxxx>
>> Signed-off-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
>> ---
>> I can observe that the reproducer no longer reports memory leak. But
>> is this change correct and sufficient? Are there similar locations?
> Thanks, but please see my email from yesterday. This is on the right
> way but a cleanup then is possible:

Oops, duplicated work again. Googling with this address did not hit, and
a thread at syzkaller-bugs group did not have your patch.

Please consider including syzbot+XXXXXXXXXXXXXXXXXXXX@xxxxxxxxxxxxxxxxxxxxxxxxx
and syzkaller-bugs@xxxxxxxxxxxxxxxx into the Cc: list so that we can google for
your patch.

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

  Powered by Linux