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

[debian-devel:11575] Re: MBR



佐野@浜松です。

In article <200002091720.CAA24530@xxxxxxxxxxxx>,
  at Thu, 10 Feb 2000 02:20:58 +0900,
   on [debian-devel:11572] Re: MBR,
 Hiroshi KISE <fuyuneko@xxxxxxxxxxxx> さん writes:

> BTSから読んでいたからかもしれないんですが、同じやりとりの繰り返しを
> してるように思えました。

 w.d.o の Lists-Archives で -devel のスレッドを見てみるという方法も
ありますが、「同じやりとりの繰り返し」以上のものは得られないかも。

もともと最初の bug report では

During installation, boot-floppies set up a MBR using /sbin/install-mbr.
The installed mbr allows user to boot from a floppy by pressing any
key, then typing "F" at the prompt. Any password protection or
boot restriction defined in lilo.conf can thus be bypassed. There
should be prominent warnings in the installation procedure to
inform administrators that choosing the default choice for MBR
installation (which is to use /sbin/install-mbr) grants root privileges
to all users with access to the console.

This is a very serious security problems; several machines at this
site have been compromised at this site because of it. This report
is therefore graded "critical" and will be forwarded to debian-security.

と書いてあったので、"There should be prominent warnings in the installation 
procedure to inform administrators that choosing the default choice for MBR
installation (which is to use /sbin/install-mbr) grants root privileges
to all users with access to the console." をさっさとやってれば、あんなに
こじれるような問題にはならなかったはずでは、と思わないでもないかも。

Ben C とかのフォローに lazy admin とか書いてあったり、既に「やっている」
と書いていることを「こうすればいい」とか見当違いのアドバイスをされたり
とかしたんでかなり気分を害したんでしょうね。

でもあそこまでこじれたのは、このメールからかな。Subject も、
より刺激的なものに変更されていたし。

Since apparently several Debian developers disagree on whether this issue
is critical or not, I'd like to get input from other developers.

  [1] The default Debian installation installs a MBR in your disk's MBR and
      installs lilo on your / partition.

  [2] Even if you setup your BIOS so that users can't boot from floppy disk
      and if you secure lilo with a password, your system can still be booted
      from a floppy:
         - press shift at boot time, and Debian's MBR will give you a prompt
           1FA:
         - then press F, and your system will boot from floppy disk, and you
           will get full root access to the hard disk

The point here is that:

  [1] An option exists to install MBR without giving access to the floppy,
      thus closing entirely this security hole

  [2] No warning is given at all during the installation that this MBR
      has extra features

Given that some of us (maybe all, this is not a flame, just a disagrement)
do believe that this is an unacceptable security issue for Debian, I would
like to get developers opinion on this.

Not fixing this in Potato and not issuing an advisory and a replacement mbr
package for past distributions makes Debian a very weak distribution.

To take an analogy, what if your distribution installs a root shell freely
available on virtual console F9 (so that it won't be easily noticed) without
warning the system administrator by default?

  Sam

PS/ in Pierre's case, machines were physically secured with anti-theft cables
    and monitored by video cameras, so compromising the hardware is much harder
    than pressing shift then F at boot time to gain root access

結局、input from other developers も期待したものでは無かったらしく、
最後は売り言葉に買い言葉で (マズイことに、よせばいいのに煽ったのが
いたんだな、またこれが) 腹いせで BugTraq へ投げたという結果につながった
わけですが。(BugTraq へのメールの最後のほうのコメントに捨てゼリフみたい
なのがあったんで、これが余計に開発者の神経を逆撫でしたらしく、一時期
開発者達がやる気を無くしたみたいになって debian-boot list がえらく静かに
なったことがありました。)

> > まあその辺は mbr の仕様上の制限のせいなんでしょうね。 F を禁止しても
> >  A があるからダメとかいう話になったんで、それじゃ mbr を使う意味が
> > かなり失せてしまうという反応になって、やっぱり元に戻そうということに
> > なったのかな、と。
> 
> なんでmbrを使っているのか、わからないです。Linuxのディストリビューション
> ではDebianだけ? ほかのから移行してきた人が、はまるかも。

 mbr package の changelog.Debian を見ると

mbr (1.0.0-3) unstable; urgency=low

  * Upgraded to new packaging standards.

 -- Shaya Potter <spotter@xxxxxxxxxxxxxxxx>  Thu, 23 Jan 1997 13:16:08 -0500

で始まっているんですが、Debian revision が -3 だからこれ以前から
存在していたんでしょうね。copyright には

This package was first put together by Bruce Perens <bruce@xxxxxxxx>.
It is currently maintained by Santiago Vila <sanvila@xxxxxx>.

と書いてあるから、「Bruce の遺産」なのかな。

なんで入れてあるかといえば、やっぱり起動時にパーティションを
選択できるのが便利だから、ということじゃないでしょうか。
 copyright には

This is Debian GNU/Linux's prepackaged version of the MBR Master Boot
Record for IBM PC compatible computers, by Neil Turton. MBR is used
in conjunction with other boot loaders such as LILO and the DOS boot
loader, which are installed on hard disk partitions. MBR makes it possible
to select one of these partition boot loaders for booting.

と書いてありますね。

そういえば slink-jp の boot-floppies のソースを見ると debian/changelog に

boot-floppies (2.0.5) frozen unstable; urgency=high

  * dinstall/bootconfig.c: Install MBR only when asked to do so. 
    fixes: Bug#19096

 -- Enrique Zanardi <ezanardi@xxxxxxxxxxxxxxxxxx>  Sun, 26 Apr 1998 19:38:08 +0100

とか書いてあるところを見ると、bo や hamm では prompt も無しで
黙って mbr をインストールしていたのかも。(未確認)

そういえばこの boot-floppies の debian/changelog の最初のほうは

boot-floppies (1.1.2-0) unstable; urgency=low

  * Updated to Standards-Version 2.1.1.0 .

 -- Bruce Perens <Bruce@xxxxxxxxx>  Sun, 13 Oct 1996 20:11:17 +0700

とか書いてあります。

そういえば「MBR が無かったら起動できないでしょ」とかいうコメントが
あったことを思うと、自作機で新品のハードディスクを買ってきて、
いきなり Debian をインストールする時のために、当時それしか選択肢が
無かったという理由で mbr を使うようになった、とかいう歴史があるのかも。

既に DOS とか入っていて、というパターンが多そうな気はするのですが、
 pure な Debian 機は MBR から Free であるべき、という理想とか
あったのかもしれません。(BIOS はハードウェアの一部だから無視)

> そういえば、「liloはデフォルトでそうなってないのに、mbrだけやっても
> しょうがないやね」みたいな意見が何回も出てました。意地はってるようにも
> みえたり。

「意地はってる」と見るか、「無意味なことをして実際にはほとんど
何の意味も無いのに security を向上させたように見せかけるべき
ではない」という主張と見るか、意見の分かれるところでしょう。

で、その意見に対しては「LILO は有名だからみんな知ってるんだ」という
反論が出ていたところからも、結局「mbr については説明が足りない」と
いう点がそもそも問題とされていたことだし、望ましい解決策としても、
説明を増やすという方向が一番妥当だろうと個人的には考えています。

> >  Joey Hess の weekly news にちょっと載ってましたね。
> 
> さっきのメイルのあと、「王様」に翻訳させて、ぐちゃぐちゃの日本語で
> 読みました。リハビリ(って何だ)ということで、あとで訳させてもらいます。

また流してもらえるのかな ? (と期待したり)

> > > ここで勘違いに気がついたのですが、mbrパッケージを入れただけでは
> > > 何もおこらなくて、install-mbrを実行しなければいけないんですね
> > Yes. extipl もコマンドを実行しなければ動作しません。lilo と同じ。
> 
> liloは、カーネルイメージの入れるときに実行しますし、Linuxの
> インストール本にも載ってますんで、けっこう目に付くんですわ。

 /usr/sbin/liloconfig を実行すると mbr についてのメッセージが
表示される (これは slink でもそうなっている) ことはあまり
知られていないようですね。

print "A master boot record is required to run the paritition boot record.\n";
print "If you are already using a boot manager, and want to keep it,\n";
print "answer \"no\" to the following question. If you don't know\n";
print "what a boot manager is or whether you have one, answer \"yes\".\n";

if ( &askn("Install a master boot record on ", $disk) ) {
        print "Installing MBR on $disk\n";
        system("dd if=/boot/mbr.b of=$disk bs=444 count=1");
}
print "\n";
print "The master boot record will boot the active partition.\n";
print "If you want your system to boot another operating system,\n";
print "such as DOS or Windows, by default, answer \"no\" to the following\n";
print "question. You may still use your boot manager or the master\n";
print "boot record to boot Linux. If you want the system to boot Linux.\n";
print "by default, answer \"yes\".\n";

if ( &asky("Make ", $device, " the active partition") ) {
        print "Activating Partition $partition on disk $disk.\n";
        system("/sbin/activate $disk $partition");
}
else {
        print "\n";
        print "OK. If you installed the master boot record, and the partition\n"
;
        print "boot record, you may boot Linux by holding down the shift key\n";
        print "as the system boots, and then pressing the $partition key\n";
        print "when you see the \"1234F:\" prompt.\n";
        print "";
        print "For more information, see /usr/doc/mbr/README, and the files\n";
        print "in the /usr/doc/lilo directory.\n";

この最後の文章は else {} の外に出して常に表示されるようにしたほうが
いいんだろうな。

# そうか、documentation/dbootstrap.sgml に追加する文章は
# ここから持ってくればいいんだ。

-- 
     # (わたしのおうちは浜松市、「夜のお菓子」で有名さ。)
    <kgh12351@xxxxxxxxxxx> : Taketoshi Sano (佐野 武俊)