From owner-freebsd-bugs Mon Oct 2 04:20:05 1995 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id EAA08524 for bugs-outgoing; Mon, 2 Oct 1995 04:20:05 -0700 Received: (from gnats@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id EAA08513 ; Mon, 2 Oct 1995 04:20:02 -0700 Resent-Date: Mon, 2 Oct 1995 04:20:02 -0700 Resent-Message-Id: <199510021120.EAA08513@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, ville@vlsi.fi Received: from vlsi1.vlsi.fi (CQ4aA/9/+IDXiYbolMq/SHsdN/uxPNYx@vlsi1.vlsi.fi [193.64.2.2]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id EAA07925 for ; Mon, 2 Oct 1995 04:16:13 -0700 Received: from layout.vlsi.fi by vlsi1.vlsi.fi with ESMTP (1.37.109.16/16.2) id AA084730573; Mon, 2 Oct 1995 12:42:53 +0200 Received: by layout.vlsi.fi (1.37.109.15/16.2) id AA059990572; Mon, 2 Oct 1995 12:42:52 +0200 Message-Id: <199510021042.AA059990572@layout.vlsi.fi> Date: Mon, 2 Oct 1995 12:42:52 +0200 From: Ville Eerola Reply-To: ville@vlsi.fi To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/760: mv foo/ ../.. causes panic Sender: owner-bugs@freebsd.org Precedence: bulk >Number: 760 >Category: kern >Synopsis: mv foo/ ../.. causes panic >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 2 04:20:01 PDT 1995 >Last-Modified: >Originator: Ville Eerola >Organization: VLSI Solution Oy >Release: FreeBSD 2.1-STABLE i386 >Environment: FreeBSD 2.1-STABLE #0: Sun Sep 17 23:18:24 EET DST 1995 ville@descent.vlsi.fi:/usr/src/sys/compile/DESCENT CPU: 120-MHz Pentium 735\\90 or 815\\100 (Pentium-class CPU) Origin = "GenuineIntel" Id = 0x525 Stepping=5 Features=0x1bf real memory = 33554432 (32768K bytes) avail memory = 30838784 (30116K bytes) Probing for devices on the ISA bus: sc0 at 0x60-0x6f irq 1 on motherboard sc0: VGA color <4 virtual consoles, flags=0x0> sio0 at 0x3f8-0x3ff irq 4 on isa sio0: type 16550A sio1 at 0x2f8-0x2ff irq 3 on isa sio1: type 16550A lpt0 at 0x378-0x37f irq 7 on isa lpt0: Interrupt-driven port lp0: TCP/IP capable interface fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa fdc0: NEC 72065B fd0: 1.44MB 3.5in wdc0 not found at 0x1f0 1 3C5x9 board(s) on ISA found at 0x300 ep0 at 0x300-0x30f irq 10 on isa ep0: aui/bnc[*BNC*] address 00:20:af:56:15:5b irq 10 npx0 on motherboard npx0: INT 16 interface Probing for devices on the PCI bus: chip0 rev 2 on pci0:0 chip1 rev 2 on pci0:7 vga0 rev 0 int a irq 11 on pci0:13 ahc0 rev 0 int a irq 9 on pci0:15 ahc0: reading board settings ahc0: Reading SEEPROM...done. ahc0: 2940 Single Channel, SCSI Id=7, aic7870, 16 SCBs ahc0: Downloading Sequencer Program...Done ahc0: Probing channel A ahc0 waiting for scsi devices to settle ahc0: target 0 synchronous at 10.0MB/s, offset = 0xf ahc0: target 0 Tagged Queuing Device (ahc0:0:0): "SEAGATE ST31230N 0300" type 0 fixed SCSI 2 sd0(ahc0:0:0): Direct-Access 1010MB (2069860 512 byte sectors) ahc0: target 1 synchronous at 10.0MB/s, offset = 0xf ahc0: target 1 Tagged Queuing Device (ahc0:1:0): "SEAGATE ST31230N 0300" type 0 fixed SCSI 2 sd1(ahc0:1:0): Direct-Access 1010MB (2069860 512 byte sectors) >Description: [note that ../.. is owned by root, and cannot be written by normal users] Executing the following commands cause panic: descent% mkdir foo descent% mv foo/ ../.. This results: panic: relookup: lookup on dot-dot It appears that mv tries to rename foo/ to ../../ which would cause bad things to happen if succesful. However, the following variants do not cause anything bad to happen: descent% mv foo ../../ mv: rename foo to ../..//foo: Permission denied descent% mv foo ../.. mv: rename foo to ../../foo: Permission denied descent% mv foo/ .. mv: rename foo/ to ../: Directory not empty >How-To-Repeat: See above... >Fix: >Audit-Trail: >Unformatted: