1 Feb 2008 11:00
Re: kern/84983: [udf] [patch] udf filesystem: stat-ting files could randomly fail
Andriy Gapon <avg <at> icyb.net.ua>
2008-02-01 10:00:16 GMT
2008-02-01 10:00:16 GMT
on 22/12/2006 20:24 Pav Lucistnik said the following: > Synopsis: [udf] [patch] udf filesystem: stat-ting files could randomly fail > > State-Changed-From-To: open->closed > State-Changed-By: pav > State-Changed-When: Fri Dec 22 18:24:14 UTC 2006 > State-Changed-Why: > Fixed in 6.1 and up > > http://www.freebsd.org/cgi/query-pr.cgi?pr=84983 I found a bug in the patch. I got a panic in real situation when testing a UDF fs with a directory with a huge number of files (~10^4), but this can be easily shown in the code too: static int udf_readatoffset(struct udf_node *node, int *size, off_t offset, struct buf **bp, uint8_t **data) { ... *size = min(*size, MAXBSIZE); if ((error = udf_readlblks(udfmp, sector, *size + (offset & udfmp->bmask), bp))) { If it so happens that *size gets MAXBSIZ value and (offset & udfmp->bmask) is not zero, then a value > MAXBSIZ would be passed to udf_readlblks->bread->breadn->getblk and the latter will panic because it has an explicit assert for size <= MAXBSIZ.(Continue reading)
RSS Feed