Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

We are MicroSoft. You will be assimilated. Resistance is futile. (Attributed to B.G., Gill Bates)


devel / comp.lang.fortran / RE: Security considerations for standard input

SubjectAuthor
o RE: Security considerations for standard inputRon Shepard

1
RE: Security considerations for standard input

<DhSxM.38395$fRmf.28143@fx02.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=3491&group=comp.lang.fortran#3491

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx02.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:102.0)
Gecko/20100101 Thunderbird/102.13.0
Subject: RE: Security considerations for standard input
Content-Language: en-US
References: <md5:vnvOBlGLXd1Eo6XR3o1irw==>
Newsgroups: comp.lang.fortran
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <md5:vnvOBlGLXd1Eo6XR3o1irw==>
X-Forwarded-Message-Id: <md5:vnvOBlGLXd1Eo6XR3o1irw==>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 33
Message-ID: <DhSxM.38395$fRmf.28143@fx02.iad>
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Mon, 31 Jul 2023 12:35:31 -0500
X-Received-Bytes: 2912
 by: Ron Shepard - Mon, 31 Jul 2023 17:35 UTC

On 7/31/23 7:37 AM, Daniel Feenberg wrote:
> Would it be accurate to say that a fortran program that reads only from standard in (read(*,*)), writes only to standard out (write(*,*)), and never calls "system" or "execute_command_line" can be offered as a cgi program to the world without any worries about format string attacks, buffer overflows, or creating other intrusion vulnerability for the server, even if it contains fortran code with undefined behavior?
[...]

It seems like there are still ways for a fortran program to interact
with the OS and the environment other than the ones mentioned above. For
example, with open() and close() statements, you can create, delete, and
overwrite files, even without read and write statements.

The detection of many io errors is compiler dependent, even within just
list-directed i/o.

By using assumed size dummy array declarations, for just one example,
one could purposely overrun arrays, allowing the program to both read or
modify memory outside the original array. This is nonconforming code, of
course, but the compiler is not required to detect or report the violation.

Some OSs support things like read-only memory, where for example fortran
constants and parameters can reside, but that is not required by the
fortran standard. Some OSs will randomize memory allocation addresses,
so that the programmer cannot depend on getting fixed addresses from run
to run, but that is also not required by the fortran standard.

The fortran transfer() function basically allows the programmer to put
any sequence of bits into any data value of any data type. Such a
sequence could corrupt existing OS functions, or if executable memory is
not protected, it could result in malicious executable code. It might
not be portable malicious code, it might need to be tailored to a target
machine, but it could be malicious nonetheless.

$.02 -Ron Shepard

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor