Date: Thu, 27 Jul 2006 23:13:09 +0400 From: Roman Kurakin <rik@inse.ru> To: freebsd-geom@FreeBSD.org Cc: Poul-Henning Kamp <phk@phk.freebsd.dk>, Pawel Jakub Dawidek <pjd@FreeBSD.org> Subject: bsdlabel: potential bug and/or question about it Message-ID: <44C91045.8090606@inse.ru>
next in thread | raw e-mail | index | archive | help
Hi, I am trying to understand filesystem structure to extract data from half-broken hard drive and I've started to read sources of bsdlabel (if someone know any articles about bsdlabel and/or ufs2 structure please let me know). My question is what for mbroffset and what is it? I have only some surmises about it, but it looks that this code could lead to filesystem corruption. But I hope I am wrong :-) http://cvsup.pt.freebsd.org/cgi-bin/cvsweb/cvsweb.cgi/src/sbin/bsdlabel/bsdlabel.c.diff?r1=1.89&r2=1.90 My train of thought was that in case we have the mbroffset not equal to offset of c (raw) partition we wouldn't substruct mbroffset from all offsets. Lets also assume that this case we meet while we started to edit such slice. We've finished editing and started to write results. In case of write we would add mbroffset unconditionally and thus we get wrong offsets and corrupted partition table. Best regards, rik
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44C91045.8090606>