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]
Message-ID: <56b8a42d-261e-1fc0-f572-8c3c1a98701d@iogearbox.net>
Date:   Tue, 27 Apr 2021 21:28:31 +0200
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org
Cc:     Aditya Pakki <pakki001@....edu>
Subject: Re: [PATCH 066/190] Revert "bpf: Remove unnecessary assertion on
 fp_old"

On 4/27/21 7:58 PM, Greg Kroah-Hartman wrote:
> On Wed, Apr 21, 2021 at 02:59:01PM +0200, Greg Kroah-Hartman wrote:
[...]
>>   kernel/bpf/core.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
>> index 75244ecb2389..da29211ea5d8 100644
>> --- a/kernel/bpf/core.c
>> +++ b/kernel/bpf/core.c
>> @@ -230,6 +230,8 @@ struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size,
>>   	struct bpf_prog *fp;
>>   	u32 pages;
>>   
>> +	BUG_ON(fp_old == NULL);
>> +
>>   	size = round_up(size, PAGE_SIZE);
>>   	pages = size / PAGE_SIZE;
>>   	if (pages <= fp_old->pages)
> 
> The original commit here is correct, I'll drop this revert.

Ok, sounds good to me, thanks! (If there would ever be an incorrect fp_old with NULL, then at
latest we crash in fp_old->pages anyway, so the BUG_ON() was not needed.)

> thanks,
> 
> greg k-h
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ