what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

8lgm-18.txt

8lgm-18.txt
Posted Sep 23, 1999

8lgm-18.txt

SHA-256 | e5ec4dd1ff9bd572ed17dd48e41959530789293aa37e1e228538ecba537cd560

8lgm-18.txt

Change Mirror Download

This advisory has been sent to:

comp.security.unix

===========================================================================
[8lgm]-Advisory-18.UNIX.SunOS-kernel.4-Dec-1994

PROGRAM:

SunOS 4.1.x kernel

VULNERABLE OS's:

SunOS 4.1.x


DESCRIPTION:

A problem was reported to bugtraq showing that unprivileged users
can panic the SunOS 4.1.x kernel if an HSFS cdrom is mounted.

The purpose of this advisory is to provide a workaround for
this problem. This patch has been successfully tested by a number
of people.

IMPACT:

Any user can crash the system.

REPEAT BY:

Assuming /cdrom is an hsfs filesystem, execute the following
program:

main()
{
pathconf("/cdrom", 0);
}

Obviously do not do this, unless you have the authority to
install the fix below.

DISCUSSION:

Two vnodeops in the hsfs_vnodeops struct appear to be left
undefined. This fix points them to a real function which
then fails the operation in the correct way.

WORKAROUND & FIX:

1. Contact your vendor for a patch.

2. In the meantime either install the workaround given
below, or avoid using HSFS mounted filesystems.


8<------------------------- cut here -------------------------
/*
* 8lgm_hsfs.c - SunOS 4.1.x HSFS bugfix.
* Copyright (C) 1994 by [8LGM].
*
* To use:
* cc -c -O -DKERNEL -D<kernel-arch> 8lgm_hsfs.c
* modload 8lgm_hsfs.o
*/

#include <sys/types.h>
#include <sys/conf.h>
#include <sys/buf.h>
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/user.h>
#include <sys/time.h>
#include <sys/vfs.h>
#include <sys/vnode.h>
#include <sys/ucred.h>
#include <sys/syslog.h>
#include <sundev/mbvar.h>
#include <sun/autoconf.h>
#include <sun/vddrv.h>

extern struct vnodeops hsfs_vnodeops;
struct vdldrv vd;

int (*old_hsfs_cntl)() = NULL;
int (*old_hsfs_realvp)() = NULL;
int loaded_8lgm_hsfs = 0;

int
hsfs_invalid()
{
return (EINVAL);
}


int
load_8lgm_hsfsfix()
{
int x;

x = splhigh();

old_hsfs_cntl = hsfs_vnodeops.vn_cntl;
old_hsfs_realvp = hsfs_vnodeops.vn_realvp;
hsfs_vnodeops.vn_cntl = hsfs_invalid;
hsfs_vnodeops.vn_realvp = hsfs_invalid;
splx(x);
return(0);
}


int
unload_8lgm_hsfsfix()
{
int x;

x = splhigh();
hsfs_vnodeops.vn_cntl = old_hsfs_cntl;
hsfs_vnodeops.vn_realvp = old_hsfs_realvp;
splx(x);
return(0);
}


int
xxxinit(function_code, vdp, vdi, vds)
unsigned int function_code;
struct vddrv *vdp;
addr_t vdi;
struct vdstat *vds;
{
bzero(&vd, sizeof(vd));
vd.Drv_magic = VDMAGIC_PSEUDO;
vd.Drv_name = "8lgm-hsfs";

switch(function_code) {
case VDLOAD:
if (loaded_8lgm_hsfs) {
log(LOG_INFO, "8lgm: hsfs fix module loaded\n")
;
return(EEXIST);
}
vdp->vdd_vdtab = (struct vdlinkage*)&vd;
load_8lgm_hsfsfix();
loaded_8lgm_hsfs++;
log(LOG_INFO, "8lgm: hsfs fix module loaded\n");
return(0);
case VDUNLOAD:
return (unload(vdp, vdi));
case VDSTAT:
return(0);
default:
return(EIO);
}
}


static int
unload(vdp, vdi)
struct vddrv *vdp;
struct vdioctl_unload *vdi;
{
if (loaded_8lgm_hsfs == 0) {
log(LOG_INFO, "8lgm: hsfs fix module not loaded!\n");
return(0);
}
unload_8lgm_hsfsfix();
loaded_8lgm_hsfs = 0;
log(LOG_INFO, "8lgm: hsfs fix module unloaded\n");
return(0);
}
8<------------------------- cut here -------------------------

-----------------------------------------------------------------------

FEEDBACK AND CONTACT INFORMATION:

majordomo@8lgm.org (Mailing list requests - try 'help'
for details)

8lgm@8lgm.org (Everything else)

8LGM FILESERVER:

All [8LGM] advisories may be obtained via the [8LGM] fileserver.
For details, 'echo help | mail 8lgm-fileserver@8lgm.org'

8LGM WWW SERVER:

[8LGM]'s web server can be reached at http://www.8lgm.org.
This contains details of all 8LGM advisories and other useful
information.
===========================================================================


Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    16 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close