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] [day] [month] [year] [list]
Message-ID: <86pluwrr3u.wl-maz@kernel.org>
Date: Thu, 11 Apr 2024 14:00:53 +0100
From: Marc Zyngier <maz@...nel.org>
To: Guanrui Huang <guanrui.huang@...ux.alibaba.com>
Cc: linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org,
	shannon.zhao@...ux.alibaba.com,
	tglx@...utronix.de,
	yuzenghui@...wei.com
Subject: Re: [PATCH v2] irqchip/gic-v3-its: Fix double free on error

On Thu, 11 Apr 2024 12:58:05 +0100,
Guanrui Huang <guanrui.huang@...ux.alibaba.com> wrote:
> 
> if (vm != domain->host_data)
> 
> This is just a safety check. It looks unlikely happened.

It's not a safety check. It is just papering over problems. If you
don't trust the vm pointer, why do you trust the domain pointer? Why
do you trust *anything* at all?

> After all, vm is obtained from the args. If the caller has a bug,
> can we check here to avoid possible problems that may arise in later
> code?

If the caller has a bug, please fix the caller. Don't paper over it.

And you can remove the BUG_ON(!vm) which is equally useless.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ