Re: [PATCH v3] pci: use security_capable() when checking capablitiesduring config space read

From: Alex Riesen
Date: Wed Feb 16 2011 - 01:24:43 EST


On Tue, Feb 15, 2011 at 02:21, Chris Wright <chrisw@xxxxxxxxxxxx> wrote:
> This reintroduces commit 47970b1b which was subsequently reverted
> as f00eaeea. ÂThe original change was broken and caused X startup
> failures and generally made privileged processes incapable of reading
> device dependent config space. ÂThe normal capable() interface returns
> true on success, but the LSM interface returns 0 on success. ÂThis thinko
> is now fixed in this patch, and has been confirmed to work properly.
>
> So, once again...Eric Paris noted that commit de139a3 ("pci: check caps
> from sysfs file open to read device dependent config space") caused the
> capability check to bypass security modules and potentially auditing.
> Rectify this by calling security_capable() when checking the open file's
> capabilities for config space reads.
>
> Reported-by: Eric Paris <eparis@xxxxxxxxxx>
> Tested-by: Dave Young <hidave.darkstar@xxxxxxxxx>
> Acked-by: James Morris <jmorris@xxxxxxxxx>
> Cc: Dave Airlie <airlied@xxxxxxxxx>
> Cc: Alex Riesen <raa.lkml@xxxxxxxxx>
> Cc: Sedat Dilek <sedat.dilek@xxxxxxxxxxxxxx>
> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Chris Wright <chrisw@xxxxxxxxxxxx>

FWIW, I confirm the fix.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/