Re: [PATCH] Staging: bcm: Fix information leak in ioctl, IOCTL_BCM_REGISTER_READ_PRIVATE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kevin,

As a [patch 2/2] could you fix rdmalt as well:

int rdmalt(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t size)
{
        INT uiRetVal = 0;

        uiRetVal = rdm(Adapter, uiAddress, (PUCHAR)pucBuff, size);
        convertEndian(RWM_READ, (PUINT)pucBuff, size);

        return uiRetVal;
}

convertEndian() should take the return value of rdm() into
consideration.

	uiRetVal = rdm(Adapter, uiAddress, (PUCHAR)pucBuff, size);
	if (uiRetVal < 0)
		return uiRetVal;
	convertEndian(RWM_READ, (PUINT)pucBuff, uiRetVal);

	return uiRetVal;

Otherwise it corrupts memory.  I would send this patch myself but it
depends on your patch going in first.  If you could give me the
reported by tag for that it would be grand:

Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

regards,
dan carpenter
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux