1755422 Members
2926 Online
108832 Solutions
New Discussion юеВ

Overflow

 
SOLVED
Go to solution
Uwe Zessin
Honored Contributor

Re: Overflow

You can assign a page's protection to PRT$_NA (no access) or not map any memory.
.
Jan van den Ende
Honored Contributor

Re: Overflow

Bojan,

stack guard pages is a nice idea, that has been thought of by others as well:

They __ARE__ implemented in IA64-VMS, and backporting that to AXP-VMS is under investigation, but there is some worry that it _MIGHT_ break existing code, so at best it would be with Switch-on/Switch-off functionality.

Info about IA64-VMS is from the Technical Update Days, about AXP-VMS is from a private discussion with Hoff afterwards.

Guess it is NOT such a bad idea then!

Cheers.

Have one on me.

Jan
Don't rust yours pelled jacker to fine doll missed aches.
Bojan Nemec
Honored Contributor

Re: Overflow

Jan,

That is a good notice. And I am glad that my philosophical thoughts are not allone. The on/off switch is good enought (if not switched off when porting or writing software which is sensible to attacks ;-)

Another thing abbout stack vulnerability is a non-executable stack (as you mentioned in this thread http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=721393 ). I think, that this must be implemented on all VMS platforms. I dont think that there are so much self constructing programs which builds the code on the stack and then execute this code. And if this is necesary it can be made in a different mode and not on the stack. Ok, for backward compatibility a special parameter can be implemented.

Bojan
Ian Miller.
Honored Contributor

Re: Overflow

I'm told by Andy Goldstein that noexecute protection was never implemented for VMS on VAX or Alpha. VAXes don't have the seperate execute protection and the fault-on-execute is not set on data sections (and the stack). The only thing that fault-on-execute protection on Alphas was used for was in translated images.
____________________
Purely Personal Opinion
Bojan Nemec
Honored Contributor

Re: Overflow

Ian,

Thanks, I was shure that the noexe flag of the psect does its work. Yust tested and you are right, the code executes fine in a:
.psect data,wrt,noexe

Maybe it will be good to implement it.

Bojan
Uwe Zessin
Honored Contributor

Re: Overflow

I am sure that will break quite some programs on VAX...


It's been some years since I helped a customer to port from VAX to Alpha. He had one small MACRO source file and when I did:

$ macro/migrate pgm

well, the compiler spit out two pages of error messages. The customer responded with a big GULP!

Now, I did a short look over the source, inserted two lines and the result was:

$ macro/migrate pgm
$

He almost fell off the chair :-)

There simply was no PSECT in the source and I just created a CODE and a DATA psect.
.
Bojan Nemec
Honored Contributor

Re: Overflow

Uwe,

It could be implemented so that old images works just like now. When you compile on the new version you receive a "protected" image, or with a qualifier to the compiler (or maybe to the linker, because I think this is an image activator problem) turn off the protection.
The problematic compiler is probably MACRO32 on VAX which can be upgraded to spit pages of error messages, as you say (nice verb for a bunch of errors :-).
With this new programs can be protected and, with time, all programs with a small number of exceptions will become protected.

Bojan
Ian Miller.
Honored Contributor

Re: Overflow

Whatever is done would have to be optional for backwards compatability and switched on by compiler switch, system paramter etc.

I don't think anything would be done for VAX/VMS but I think something could be done for alpha vms and itanium vms.

Parhaps its time for another entry on the hpadvocacy web site? (as well as discussing it with your favorite hp VMS contact).
____________________
Purely Personal Opinion
Jan van den Ende
Honored Contributor

Re: Overflow

Ian,

as I still cannot enter deep enough into the Advocasy site (something with confusion about logging in the one site and address a mirror or the other way around, and then NOT being authorized on that. Being worked on),
would you please do the service?
I guess entering a pointer to this stream will get the message over.

Cheers.

Have one on me.

jpe

Don't rust yours pelled jacker to fine doll missed aches.
Ian Miller.
Honored Contributor
Solution

Re: Overflow

I've submitted this but it wont appear just yet. When I submitted this the following was displayed
"Your issue will not appear immediately. All submitted issues are reviewed for posting each Monday. If there are questions about your issue submission, you will be contacted via email.
"

When it appears I will post a link here and you can all go and vote.
____________________
Purely Personal Opinion