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:	Thu, 17 Apr 2008 23:26:12 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	mcarlson@...adcom.com
Cc:	netdev@...r.kernel.org, mchan@...adcom.com, andy@...yhouse.net,
	tonyb@...ernetics.com
Subject: Re: [PATCH 1/2] tg3: 5701 DMA corruption fix

From: "Matt Carlson" <mcarlson@...adcom.com>
Date: Wed, 16 Apr 2008 15:27:41 -0700

> +		while (pci_id->vendor != 0) {
> +			bridge = pci_get_device(pci_id->vendor,
> +						pci_id->device,
> +						bridge);
> +			if (!bridge) {
> +				pci_id++;
> +				continue;
> +			}
> +			if (bridge->subordinate &&
> +			    (bridge->subordinate->number <=
> +			     tp->pdev->bus->number) &&
> +			    (bridge->subordinate->subordinate >=
> +			     tp->pdev->bus->number)) {
> +				tp->tg3_flags3 |= TG3_FLG3_5701_DMA_BUG;
> +				pci_dev_put(bridge);
> +				break;
> +			}
> +		}
> +	}

This code block will leak bridge device objects when the table
comparison check fails.

Probably the best thing to do is seperate the boolean check
from the other operations:

	bool match = false;
 ...
	if (bridge->subordinate &&
	    (bridge->subordinate->number <=
	     tp->pdev->bus->number) &&
	    (bridge->subordinate->subordinate >=
	     tp->pdev->bus->number))
		match = true;

	pci_dev_put_bridge(bridge);

	if (match) {
		tp->tg3_flags |= TG3_FLG3_5701_DMA_BUG;
		pci_dev_put(bridge);
	}

Please fix this up, and combine the version bump into this patch.

Thank you!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ