Message ID | 20230607135702.32679-1-forst@pen.gy (mailing list archive) |
---|---|
State | Accepted |
Commit | 2203718c2f59ffdd6c78d54e5add594aebb4461e |
Headers | show |
Series | [net-next,v4,1/4] usbnet: ipheth: fix risk of NULL pointer deallocation | expand |
Hello: This series was applied to netdev/net-next.git (main) by David S. Miller <davem@davemloft.net>: On Wed, 7 Jun 2023 15:56:59 +0200 you wrote: > From: Georgi Valkov <gvalkov@gmail.com> > > The cleanup precedure in ipheth_probe will attempt to free a > NULL pointer in dev->ctrl_buf if the memory allocation for > this buffer is not successful. While kfree ignores NULL pointers, > and the existing code is safe, it is a better design to rearrange > the goto labels and avoid this. > > [...] Here is the summary with links: - [net-next,v4,1/4] usbnet: ipheth: fix risk of NULL pointer deallocation https://git.kernel.org/netdev/net-next/c/2203718c2f59 - [net-next,v4,2/4] usbnet: ipheth: transmit URBs without trailing padding https://git.kernel.org/netdev/net-next/c/3e65efcca87a - [net-next,v4,3/4] usbnet: ipheth: add CDC NCM support https://git.kernel.org/netdev/net-next/c/a2d274c62e44 - [net-next,v4,4/4] usbnet: ipheth: update Kconfig description https://git.kernel.org/netdev/net-next/c/0c6e9d32ef0c You are awesome, thank you!
Thank you David! Can you please also backport the patch-series to Linux kernel 5.15, which is in use by the OpenWRT project! The patches apply cleanly. Cheers! Georgi Valkov httpstorm.com nano RTOS > On 9 Jun 2023, at 12:30 PM, patchwork-bot+netdevbpf@kernel.org wrote: > > Hello: > > This series was applied to netdev/net-next.git (main) > by David S. Miller <davem@davemloft.net>: > > On Wed, 7 Jun 2023 15:56:59 +0200 you wrote: >> From: Georgi Valkov <gvalkov@gmail.com> >> >> The cleanup precedure in ipheth_probe will attempt to free a >> NULL pointer in dev->ctrl_buf if the memory allocation for >> this buffer is not successful. While kfree ignores NULL pointers, >> and the existing code is safe, it is a better design to rearrange >> the goto labels and avoid this. >> >> [...] > > Here is the summary with links: > - [net-next,v4,1/4] usbnet: ipheth: fix risk of NULL pointer deallocation > https://git.kernel.org/netdev/net-next/c/2203718c2f59 > - [net-next,v4,2/4] usbnet: ipheth: transmit URBs without trailing padding > https://git.kernel.org/netdev/net-next/c/3e65efcca87a > - [net-next,v4,3/4] usbnet: ipheth: add CDC NCM support > https://git.kernel.org/netdev/net-next/c/a2d274c62e44 > - [net-next,v4,4/4] usbnet: ipheth: update Kconfig description > https://git.kernel.org/netdev/net-next/c/0c6e9d32ef0c > > You are awesome, thank you! > -- > Deet-doot-dot, I am a bot. > https://korg.docs.kernel.org/patchwork/pwbot.html > >
On Fri, Jun 09, 2023 at 01:42:09PM +0300, George Valkov wrote: > Thank you David! > > Can you please also backport the patch-series to Linux kernel 5.15, which is in use by the OpenWRT project! The patches apply cleanly. <formletter> This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly. </formletter>
diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c index 6a769df0b..8875a3d0e 100644 --- a/drivers/net/usb/ipheth.c +++ b/drivers/net/usb/ipheth.c @@ -510,8 +510,8 @@ static int ipheth_probe(struct usb_interface *intf, ipheth_free_urbs(dev); err_alloc_urbs: err_get_macaddr: -err_alloc_ctrl_buf: kfree(dev->ctrl_buf); +err_alloc_ctrl_buf: err_endpoints: free_netdev(netdev); return retval;