From: jms@mrsvax.mis.arizona.edu (Entia non sunt multiplicanda praeter necessitatem)
Newsgroups: comp.os.vms
Subject: Reminder: Don't let your users fill up your system disk
Date: 25 Aug 92 22:00:00 GMT
Reply-To: jms@arizona.edu
Distribution: world,local
Organization: University of Arizona MIS Department
X-Lunar-Date: 3 days, 5 hours, 6 minutes since the last quarter of the moon
News-Software: VAX/VMS VNEWS 1.41

Folks:

After accidentally almost crashing a VMS system because it had image
accounting turned on and I was running an image in a .COM file with
an infinite loop, it occured to me that many of you might not be
aware of the more subtle danger that the accounting facilities offer---
the opportunity for any unprivileged user to fill up your system disk,
if you accept Digital's default accounting status.

Well, obviously, if you're running IMAGE accounting (i.e., $ SET
ACC/ENABLE=IMAGE), then you know that you can get lots of blocks of
data without even thinking about it.  However, if you simply turned
off image accountning (i.e., in your system startup, you did a 
$ SET ACC/ENABLE/DISABLE=(IMAGE)) then you have something called
"USER" accounting turned on.  This is a facility which lets an 
unprivileged user send a message to the accounting file, presumably
so that accounting applications later on can do something with it. 

Unless you plan to use this facility, you should turn this kind of
accounting off.  Otherwise, a simple program (check below my signature)
could be used by a malicious user to fill up your system disk 
almost instantaneously. 

Summary:
	1) type $ SHOW ACC
	2) if you see:

Accounting is currently enabled to log the following activities:
[some lines deleted]
      MESSAGE        user messages

		you may be leaving yourself open.  Consider typing
	$ set acc/disable=(message).


Joel M Snyder, 1103 E Spring Street, Tucson, AZ, 85719 
Phone: 602.882.4094 (voice) .4095 (FAX) .4093 (data)
BITNET: jms@Arizona  Internet: jms@arizona.edu  SPAN: 47541::telcom::jms
I hope the "Eurythmics" practice birth control...

Example, without the infinite loop:

        integer*4       sys$sndjbcw,status,i
        include         '($sjcdef)'
        structure /itmlst/
            union
                map
                    integer*2 buflen /0/ , code /0/
                    integer*4 bufaddr /0/ , retlenadr /0/
                end map
                map
                    integer*4 end_list /0/
                end map
            end union
        end structure
        structure       /iosb/
            integer*4   sts,nada
        end structure
        record /itmlst/ msglst(3)
        record /iosb/   msgiosb
        character*255   message
        do i=1,255
         message(i:i) = char(i)
        end do

        msglst(1).buflen = 255
        msglst(1).code = SJC$_ACCOUNTING_MESSAGE
        msglst(1).bufaddr = %loc(message)
        msglst(1).retlenadr = 0

        msglst(2).end_list = 0

        status = sys$sndjbcw (,
        1               %val(sjc$_write_accounting),
        2               ,
        3               msglst,
        4               msgiosb,
        5               ,)

        if (status) status = msgiosb.sts
        if (.not. status) call lib$signal (%val(status))
        end