lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 19 Nov 2018 09:23:57 +0800
From:   YueHaibing <yuehaibing@...wei.com>
To:     Daniel Mack <daniel@...que.org>, <b.zolnierkie@...sung.com>,
        <robert.jarzmik@...e.fr>
CC:     <linux-kernel@...r.kernel.org>, <linux-fbdev@...r.kernel.org>,
        <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH -next] video: fbdev: pxafb: Fix "WARNING: invalid free of
 devm_ allocated data"


On 2018/11/17 4:05, Daniel Mack wrote:
> On 16/11/2018 12:02 PM, YueHaibing wrote:
>> 'info->modes' got allocated with devm_kcalloc in of_get_pxafb_display.
>>
>> This gives this error message:
>>    ./drivers/video/fbdev/pxafb.c:2238:2-7: WARNING: invalid free of devm_ allocated data
>>
>> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> 
> Oh, yes. Thanks for spotting this!
> 
> Could you please add these lines to the patch and resubmit?
> 

Sure, will send v2.

> 
> Fixes: c8f96304ec8b4 ("video: fbdev: pxafb: switch to devm_* API")
> Cc: stable@...nel.org [v4.19+]
> Reviewed-by: Daniel Mack <daniel@...que.org>
> 
> 
> 
> 
>> ---
>>   drivers/video/fbdev/pxafb.c | 4 +---
>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
>> index bbed039..d59c8a5 100644
>> --- a/drivers/video/fbdev/pxafb.c
>> +++ b/drivers/video/fbdev/pxafb.c
>> @@ -2234,10 +2234,8 @@ static struct pxafb_mach_info *of_pxafb_of_mach_info(struct device *dev)
>>       if (!info)
>>           return ERR_PTR(-ENOMEM);
>>       ret = of_get_pxafb_mode_info(dev, info);
>> -    if (ret) {
>> -        kfree(info->modes);
>> +    if (ret)
>>           return ERR_PTR(ret);
>> -    }
>>         /*
>>        * On purpose, neither lccrX registers nor video memory size can be
>>
> 
> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ