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, 8 Feb 2016 13:18:22 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Alexandre Bounine <alexandre.bounine@....com>
Cc:	Matt Porter <mporter@...nel.crashing.org>,
	Aurelien Jacquiot <a-jacquiot@...com>,
	Andre van Herk <andre.van.herk@...drive-technologies.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 22/30] rapidio: add global inbound port write interfaces

On Fri,  5 Feb 2016 18:19:38 -0500 Alexandre Bounine <alexandre.bounine@....com> wrote:

> +int rio_del_mport_pw_handler(struct rio_mport *mport, void *context,
> +			     int (*pwcback)(struct rio_mport *mport,
> +			     void *context, union rio_pw_msg *msg, int step))
> +{
> +	int rc = -EINVAL;
> +	struct rio_pwrite *pwrite;
> +
> +	mutex_lock(&mport->lock);
> +	list_for_each_entry(pwrite, &mport->pwrites, node) {

You have a use-after-free here - list_for_each_entry() references the
pwrite_node_next which was freed on the previous loop.

I'll switch this to list_for_each_entry_safe.  Please test that change
and review the other patches for reoccurrences.

> +		if (pwrite->pwcback == pwcback && pwrite->context == context) {
> +			list_del(&pwrite->node);
> +			kfree(pwrite);
> +			rc = 0;
> +			break;
> +		}
> +	}
> +	mutex_unlock(&mport->lock);
> +
> +	return rc;
> +}
> +EXPORT_SYMBOL_GPL(rio_del_mport_pw_handler);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ