From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fdb0e,cdca3dc8d6167cd4 X-Google-Attributes: gidfdb0e,public X-Google-Thread: 1164f8,cdca3dc8d6167cd4 X-Google-Attributes: gid1164f8,public X-Google-Thread: f7344,a808e23c428d1184 X-Google-Attributes: gidf7344,public X-Google-ArrivalTime: 2002-01-02 13:21:34 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!news.binc.net!koehler From: koehler@encompasserve.org (Bob Koehler) Newsgroups: comp.os.vms,alt.sys.pdp10,comp.sys.dec Subject: Re: Buffer Overflows - again Was: (Re: Congratulations for the festive sea Date: 2 Jan 2002 15:21:28 -0600 Organization: Encompasserve Message-ID: References: <3roT7.207043$tf5.13617499@bin5.nnrp.aus1.giganews.com> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1010006490 15400 192.135.80.34 (2 Jan 2002 21:21:30 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Wed, 2 Jan 2002 21:21:30 +0000 (UTC) Xref: archiver1.google.com comp.os.vms:57870 alt.sys.pdp10:8988 comp.sys.dec:10794 In article , young_r@encompasserve.org (Rob Young) writes: >> > > Man... rough crowd for a Friday. Very rough. The part lost in > the above is that Bart Z. mentioned PSECTS and PSECTS are the key. > Trimming all that was trimmed loses all meaningful context. Tell > me how you write code to this PSECT: > .PSECT $CODE RD,NOWRT,EXE,SHR,PIC You don't. The hardware enforces NOWRT after the page faults in and the kernel sets the nowrite bit in the page protection. > ;+ > ; Begin main routine. > ; > > Conversely, tell me how you execute code in this PSECT: > > ;+ > ; Declare data PSECT and objects. > ;- > .PSECT $DATA RD,WRT,NOEXE,NOSHR,PIC Trivial. EXE/NOEXE is a linker hint for optimal image section arangement. Even the Macro-32 compiler will complain if you violate NOEXE. But once you get the code there, nothing in the hardware enforces NOEXE. Besides, most buffer overruns occur on the stack. There's no PSECT for the stack, and no protection against running code on it.