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: <YdP5N3lYqF09dLPv@kroah.com>
Date:   Tue, 4 Jan 2022 08:37:27 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Li Fei1 <fei1.li@...el.com>
Cc:     Zhou Qingyang <zhou1615@....edu>, kjlu@....edu,
        reinette.chatre@...el.com, zhi.a.wang@...el.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] virt: acrn: fix a memory leak bug in acrn_dev_ioctl()

On Tue, Jan 04, 2022 at 11:50:33AM +0800, Li Fei1 wrote:
> On Tue, Jan 04, 2022 at 11:45:01AM +0800, Zhou Qingyang wrote:
> > In acrn_dev_ioctl(), vm_param is not released or passed out on the 
> > error path of "if ((vm_param->reserved0 | vm_param->reserved1) != 0)", 
> > which could lead to a memory leak.
> > 
> > Fix this bug by adding a kfree of vm_param on the error path.
> > 
> > This bug was found by a static analyzer.
> > 
> > Builds with CONFIG_ACRN_GUEST=y, CONFIG_ACRN_HSM=y show no new warnings, 
> > and our static analyzer no longer warns about this code.
> > 
> > Fixes: 9c5137aedd11 (“9c5137aedd11 virt: acrn: Introduce VM management interfaces”)
> > Signed-off-by: Zhou Qingyang <zhou1615@....edu>
> > ---
> > The analysis employs differential checking to identify inconsistent
> > security operations (e.g., checks or kfrees) between two code paths
> > and confirms that the inconsistent operations are not recovered in 
> > the current function or the callers, so they constitute bugs. 
> > 
> > Note that, as a bug found by static analysis, it can be a false
> > positive or hard to trigger. Multiple researchers have cross-reviewed
> > the bug.
> > 
> > Changes in v2:
> >   -  Fix the same bug in ACRN_IOCTL_SET_VCPU_REGS.
> > 
> 
> Signed-off-by: Fei Li <fei1.li@...el.com>

For the multiple obvious reasons (not the least being you didn't even
run it through our normal testing scripts), I am not going to take this
change, sorry.

Fei, please be more careful in the future.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ