Re: athn(4) hostap: mem leak

2018-12-05 Thread Stefan Sperling
On Wed, Dec 05, 2018 at 07:55:07PM +0100, Benjamin Baier wrote: > Finally got a usb athn device. I can confirm that this codepath is hit > in hostap mode and the device still works with the patch. > > athn0 at uhub4 port 2 configuration 1 interface 0 "ATHEROS USB2.0 WLAN" rev > 2.00/1.08 addr 3

Re: athn(4) hostap: mem leak

2018-12-05 Thread Benjamin Baier
Finally got a usb athn device. I can confirm that this codepath is hit in hostap mode and the device still works with the patch. athn0 at uhub4 port 2 configuration 1 interface 0 "ATHEROS USB2.0 WLAN" rev 2.00/1.08 addr 3 athn0: AR9271 rev 1 (1T1R), ROM rev 13, address c4:e9:84:dc:27:11 Full

Re: athn(4) hostap: mem leak

2018-12-02 Thread Benjamin Baier
On Sat, 1 Dec 2018 15:48:13 -0200 Martin Pieuchot wrote: > On 30/11/18(Fri) 13:49, Benjamin Baier wrote: > > Hi > > > > There is a leak of *arg in > > dev/usb/if_athn_usb.c:athn_usb_newauth() line 1263 > > since Rev. 1.49 > > Because athn_usb_do_async() memcpy's the argument anyway. > > > >

Re: athn(4) hostap: mem leak

2018-12-01 Thread Martin Pieuchot
On 30/11/18(Fri) 13:49, Benjamin Baier wrote: > Hi > > There is a leak of *arg in > dev/usb/if_athn_usb.c:athn_usb_newauth() line 1263 > since Rev. 1.49 > Because athn_usb_do_async() memcpy's the argument anyway. > > Found with llvm/scan-build. > > Instead of adding free(arg) I opted to make

Re: athn(4) hostap: mem leak

2018-12-01 Thread Alexandre Ratchov
On Sat, Dec 01, 2018 at 10:14:38AM +0100, Benjamin Baier wrote: > On Fri, 30 Nov 2018 16:55:42 +0100 > Alexandre Ratchov wrote: > > > On Fri, Nov 30, 2018 at 01:49:56PM +0100, Benjamin Baier wrote: > > > Hi > > > > > > There is a leak of *arg in > > > dev/usb/if_athn_usb.c:athn_usb_newauth()

Re: athn(4) hostap: mem leak

2018-12-01 Thread Benjamin Baier
On Fri, 30 Nov 2018 16:55:42 +0100 Alexandre Ratchov wrote: > On Fri, Nov 30, 2018 at 01:49:56PM +0100, Benjamin Baier wrote: > > Hi > > > > There is a leak of *arg in > > dev/usb/if_athn_usb.c:athn_usb_newauth() line 1263 > > since Rev. 1.49 > > Because athn_usb_do_async() memcpy's the

Re: athn(4) hostap: mem leak

2018-11-30 Thread Alexandre Ratchov
On Fri, Nov 30, 2018 at 01:49:56PM +0100, Benjamin Baier wrote: > Hi > > There is a leak of *arg in > dev/usb/if_athn_usb.c:athn_usb_newauth() line 1263 > since Rev. 1.49 > Because athn_usb_do_async() memcpy's the argument anyway. > > Found with llvm/scan-build. > > Instead of adding free(arg)

Re: athn(4) hostap: mem leak

2018-11-30 Thread Stefan Sperling
On Fri, Nov 30, 2018 at 01:49:56PM +0100, Benjamin Baier wrote: > Hi > > There is a leak of *arg in > dev/usb/if_athn_usb.c:athn_usb_newauth() line 1263 > since Rev. 1.49 > Because athn_usb_do_async() memcpy's the argument anyway. > > Found with llvm/scan-build. > > Instead of adding free(arg)