From: Vincent Mailhol <mailhol@kernel.org>
To: Szymon Wilczek <swilczek.lx@gmail.com>, mkl@pengutronix.de
Cc: linux-can@vger.kernel.org, linux-kernel@vger.kernel.org,
syzbot+e8cb6691a7cf68256cb8@syzkaller.appspotmail.com
Subject: Re: [PATCH v2] can: etas_es58x: allow partial RX URB allocation to succeed
Date: Tue, 23 Dec 2025 21:15:34 +0100 [thread overview]
Message-ID: <3ebbe8cb-6041-4aac-a789-de04e612d2a8@kernel.org> (raw)
In-Reply-To: <20251223011732.39361-1-swilczek.lx@gmail.com>
On 23/12/2025 at 02:17, Szymon Wilczek wrote:
> When es58x_alloc_rx_urbs() fails to allocate the requested number of
> URBs but succeeds in allocating some, it returns an error code.
> This causes es58x_open() to return early, skipping the cleanup label
> 'free_urbs', which leads to the anchored URBs being leaked.
>
> As pointed out by maintainer Vincent Mailhol, the driver is designed
> to handle partial URB allocation gracefully. Therefore, partial
> allocation should not be treated as a fatal error.
>
> Modify es58x_alloc_rx_urbs() to return 0 if at least one URB has been
> allocated, restoring the intended behavior and preventing the leak
> in es58x_open().
>
> Fixes: 8537257874e9 ("can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces")
> Reported-by: syzbot+e8cb6691a7cf68256cb8@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=e8cb6691a7cf68256cb8
> Signed-off-by: Szymon Wilczek <swilczek.lx@gmail.com>
Thanks for the fix!
Reviewed-by: Vincent Mailhol <mailhol@kernel.org>
Yours sincerely,
Vincent Mailhol
next prev parent reply other threads:[~2025-12-23 20:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-22 15:42 [PATCH] can: etas_es58x: fix memory leak in es58x_open() Szymon Wilczek
2025-12-22 19:07 ` Vincent Mailhol
2025-12-23 1:17 ` [PATCH v2] can: etas_es58x: allow partial RX URB allocation to succeed Szymon Wilczek
2025-12-23 20:15 ` Vincent Mailhol [this message]
2025-12-24 12:02 ` Marc Kleine-Budde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3ebbe8cb-6041-4aac-a789-de04e612d2a8@kernel.org \
--to=mailhol@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=swilczek.lx@gmail.com \
--cc=syzbot+e8cb6691a7cf68256cb8@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®