Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The Universe is populated by stable things. -- Richard Dawkins


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

SubjectAuthor
* Security considerations for standard inputDaniel Feenberg
+* Security considerations for standard inputgah4
|`* Security considerations for standard inputSpiros Bousbouras
| +* Security considerations for standard inputKalevi Kolttonen
| |`* Security considerations for standard inputThomas Koenig
| | `- Security considerations for standard inputKalevi Kolttonen
| `- Security considerations for standard inputDaniel Feenberg
+- Security considerations for standard inputThomas Koenig
`- Security considerations for standard inputPeter Klausler US

1
Security considerations for standard input

<ec282885-9283-4a75-89e5-6aa5829c9528n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:6dc1:b0:408:5e67:a0e with SMTP id ir1-20020a05622a6dc100b004085e670a0emr46129qtb.4.1690807027657;
Mon, 31 Jul 2023 05:37:07 -0700 (PDT)
X-Received: by 2002:a05:6808:19a3:b0:3a4:2943:8f7 with SMTP id
bj35-20020a05680819a300b003a4294308f7mr19736648oib.5.1690807027209; Mon, 31
Jul 2023 05:37:07 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Mon, 31 Jul 2023 05:37:06 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2603:3005:b2a:c100:9c30:79d3:48c9:ed6e;
posting-account=UKzVQwoAAAC0p4fW4nFhSsDyRRVgSJiF
NNTP-Posting-Host: 2603:3005:b2a:c100:9c30:79d3:48c9:ed6e
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ec282885-9283-4a75-89e5-6aa5829c9528n@googlegroups.com>
Subject: Security considerations for standard input
From: feenb...@gmail.com (Daniel Feenberg)
Injection-Date: Mon, 31 Jul 2023 12:37:07 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2725
 by: Daniel Feenberg - Mon, 31 Jul 2023 12:37 UTC

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?

My thought is that the fortran standard specifies that input discard unexpected characters, so that most dangers are eliminated. Is it possible that some compilers are still vulnerable? Would modern features such as pointers make a blanket statement unwise? Are there common operating systems that would not terminate a program that referenced memory assigned to another process? Can a compiled fortran program write over the code segment? I suppose all this depends on the OS, I am only interested in the most common ones - Windows, Linux, OSX.

I did find https://www.open-std.org/jtc1/sc22/wg23/docs/ISO-IECJTC1-SC22-WG23_N1295-24772-8-fortran-draft-after-mtg-20230522.docx (sorry if the URL wrapped) which is about "vulnerabilities", but as far as I can tell, all of the vulnerabilities are about program correctness, not about potentials for intrusion. For instance, it warns about integer overflows, out of bounds array subscripts, loss of information on type conversion, implicit typing, etc. I don't think an of those errors can lead to arbitrary code execution - can they? Is there something simple that would reassure an auditor?

Re: Security considerations for standard input

<1b4a601a-8810-490f-9e35-f1be696482a6n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:7ee:b0:635:e5ff:b4b7 with SMTP id bp14-20020a05621407ee00b00635e5ffb4b7mr36858qvb.3.1690826333875;
Mon, 31 Jul 2023 10:58:53 -0700 (PDT)
X-Received: by 2002:a05:6808:1801:b0:3a1:c163:6022 with SMTP id
bh1-20020a056808180100b003a1c1636022mr20176945oib.4.1690826333705; Mon, 31
Jul 2023 10:58:53 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Mon, 31 Jul 2023 10:58:53 -0700 (PDT)
In-Reply-To: <ec282885-9283-4a75-89e5-6aa5829c9528n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:b879:6c20:df83:e712;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:b879:6c20:df83:e712
References: <ec282885-9283-4a75-89e5-6aa5829c9528n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1b4a601a-8810-490f-9e35-f1be696482a6n@googlegroups.com>
Subject: Re: Security considerations for standard input
From: gah...@u.washington.edu (gah4)
Injection-Date: Mon, 31 Jul 2023 17:58:53 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3587
 by: gah4 - Mon, 31 Jul 2023 17:58 UTC

On Monday, July 31, 2023 at 5:37:09 AM UTC-7, 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?

Buffer overflow is harder in Fortran than C, but not impossible.

Some systems have a user "nobody" with minimal privilege.
You can also, with most Unix-like systems, chroot(), which prevents access to files
outside of ones specifically given to the program.

> My thought is that the fortran standard specifies that input discard unexpected characters,
> so that most dangers are eliminated. Is it possible that some compilers are still vulnerable?

The C gets() call is well known for problems. There is nothing quite that bad in Fortran.

> Would modern features such as pointers make a blanket statement unwise?

One interesting attack that otherwise seems to require no privilege is SQL insertion.
(You didn't mention not using SQL.)

Some programs, especially CGI, take input data and use it as part of an SQL query.

If someone puts in SQL commands, instead of, for example, their name,
and the program passes that onto the DBMS, it is possible to attack the data
base system itself. Extract data that they weren't supposed to, or delete data.

Some DBMS might even have the ability to execute system commands.

> Are there common operating systems that would not terminate a program
> that referenced memory assigned to another process?

Modern Windows and any Unix-like system, should be good at that.

> Can a compiled fortran program write over the code segment?

Usual 32 bit systems, overlap the code and data segments.
There are some tricks that are supposed to stop overwriting code.
I am not sure you can make a blanket statement about them.

> I suppose all this depends on the OS, I am only interested in the most common ones - Windows, Linux, OSX.

Re: Security considerations for standard input

<ua8uah$1j7eq$1@newsreader4.netcologne.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-e8ee-0-e52f-b509-aff3-9d0a.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: Security considerations for standard input
Date: Mon, 31 Jul 2023 18:25:21 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <ua8uah$1j7eq$1@newsreader4.netcologne.de>
References: <ec282885-9283-4a75-89e5-6aa5829c9528n@googlegroups.com>
Injection-Date: Mon, 31 Jul 2023 18:25:21 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-e8ee-0-e52f-b509-aff3-9d0a.ipv6dyn.netcologne.de:2001:4dd7:e8ee:0:e52f:b509:aff3:9d0a";
logging-data="1678810"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Mon, 31 Jul 2023 18:25 UTC

Daniel Feenberg <feenberg@gmail.com> schrieb:
> 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,

That is true. Format string attacks are not a concern in Fortran.
You can exactly determine the width of an output string, for
example, but you have to live with having it filled up with asterisks
if it overflows.

>buffer overflows,

No worries - no. Arrays can overflow, as can strings. Fortran is a bit
better than C because it can pass lengths together with arrays or
strings, but it can still be problematic. That depends on how you
write the code.

> or creating other intrusion vulnerability for the server, even if
> it contains fortran code with undefined behavior?

Unlike C, Fortran has no concept of undefined behavior written into
the standard. It has errors that a compiler must detect (or it's
a compiler error) in the constraints. Also, it has many places where
"shall" is used, for example for out-of-bounds array accesses.

If the code violates such a directive, you are on your own as far
as the standard is concerned, and a change in compiler version or
options could give different and unexpected results.

> My thought is that the fortran standard specifies that
> input discard unexpected characters,

It does not. Unexpected characters lead to errors, which are
usually detected by the runtime library and which lead to
the program's termination. You can check for errors yourself,
but then you have to deal with them.

>so that most dangers are eliminated.

If "program terminates on unexpected input" is acceptable to you, then
Fortran is indeed easier to make safe than, for example, C, where
you have to do all checking yourself.

>Is it possible that some compilers are still vulnerable?

It is usually not the compilers which are the problem, it is
the code. If you can spare the cycles, you might want to enable
as many run-time checks as possible, for example bounds checking.

> Would modern features such as pointers make a blanket statement
> unwise?

Fortran has allocatable variables, which take a huge load of a
programmers's shoulders - they are deallocated when they go
out of scope.

>Are there common operating systems that would not terminate
>a program that referenced memory assigned to another process? Can
>a compiled fortran program write over the code segment?

Usually, code segments are read-only. Another issue is executable
stacks, which are vulnerable in principle when overwritten.

>I suppose all this depends on the OS, I am only interested in
> the most common ones - Windows, Linux, OSX.

Code pages should usually be read-only.

> I did find
> https://www.open-std.org/jtc1/sc22/wg23/docs/ISO-IECJTC1-SC22-WG23_N1295-24772-8-fortran-draft-after-mtg-20230522.docx
> (sorry if the URL wrapped) which is about "vulnerabilities", but
> as far as I can tell, all of the vulnerabilities are about program
> correctness, not about potentials for intrusion. For instance, it
> warns about integer overflows, out of bounds array subscripts, loss
> of information on type conversion, implicit typing, etc. I don't
> think an of those errors can lead to arbitrary code execution -
> can they?

Out of bounds subscript are indeed a classic vulnerability -
probably not as common as in C, where the routinely occur
in strings, but still a problem.

Integer overflow can also lead to out-of-bounds subscripts.

>Is there something simple that would reassure an auditor?

Hmm... depends. Running with most run-time checks enabled
(and a paranoid compiler, nagfor is known to be the most
paranoid with the right option) could go a long way.

Re: Security considerations for standard input

<cfb92521-6ebe-44d4-8c95-35197abc73d0n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ad4:5a14:0:b0:637:49c7:28d9 with SMTP id ei20-20020ad45a14000000b0063749c728d9mr41363qvb.0.1690848864112;
Mon, 31 Jul 2023 17:14:24 -0700 (PDT)
X-Received: by 2002:a05:6808:1b24:b0:3a3:7087:bbfb with SMTP id
bx36-20020a0568081b2400b003a37087bbfbmr21628842oib.6.1690848863784; Mon, 31
Jul 2023 17:14:23 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Mon, 31 Jul 2023 17:14:23 -0700 (PDT)
In-Reply-To: <ec282885-9283-4a75-89e5-6aa5829c9528n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=12.154.207.45; posting-account=ZT-cAwoAAACx2tBPXm-WZoHIT8sjnGGy
NNTP-Posting-Host: 12.154.207.45
References: <ec282885-9283-4a75-89e5-6aa5829c9528n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cfb92521-6ebe-44d4-8c95-35197abc73d0n@googlegroups.com>
Subject: Re: Security considerations for standard input
From: pklaus...@nvidia.com (Peter Klausler US)
Injection-Date: Tue, 01 Aug 2023 00:14:24 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2050
 by: Peter Klausler US - Tue, 1 Aug 2023 00:14 UTC

On Monday, July 31, 2023 at 5:37:09 AM UTC-7, 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?

More than one Fortran compiler for Linux enables code execution privileges on the stack segment of an executable program to ease their implementation of "thunks" for using internal procedures as procedure pointer targets and actual procedure arguments, so I think that it might actually be easier to hack into those binaries.

Re: Security considerations for standard input

<DYseZ48yZ4i4Yyuma@bongo-ra.co>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spi...@gmail.com (Spiros Bousbouras)
Newsgroups: comp.lang.fortran
Subject: Re: Security considerations for standard input
Date: Tue, 1 Aug 2023 13:15:44 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <DYseZ48yZ4i4Yyuma@bongo-ra.co>
References: <ec282885-9283-4a75-89e5-6aa5829c9528n@googlegroups.com> <1b4a601a-8810-490f-9e35-f1be696482a6n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 1 Aug 2023 13:15:44 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5cb278213c617d150ba1ca31850f1a99";
logging-data="3860606"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18z20w5+vtHkpfoaDHUukd7"
Cancel-Lock: sha1:P/JbvjpyzUT3RfXa8Z7H4u9P4oA=
X-Server-Commands: nowebcancel
X-Organisation: Weyland-Yutani
In-Reply-To: <1b4a601a-8810-490f-9e35-f1be696482a6n@googlegroups.com>
 by: Spiros Bousbouras - Tue, 1 Aug 2023 13:15 UTC

On Mon, 31 Jul 2023 10:58:53 -0700 (PDT)
gah4 <gah4@u.washington.edu> wrote:

> The C gets() call is well known for problems. There is nothing quite
> that bad in Fortran.

gets() was deprecated in the 1999 C standard and was removed in the
2011 standard.

Re: Security considerations for standard input

<uadi9c$2hnd$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.lang.fortran
Subject: Re: Security considerations for standard input
Date: Wed, 2 Aug 2023 12:30:37 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 30
Sender: <untosten@0.0.0.0>
Message-ID: <uadi9c$2hnd$1@dont-email.me>
References: <ec282885-9283-4a75-89e5-6aa5829c9528n@googlegroups.com> <1b4a601a-8810-490f-9e35-f1be696482a6n@googlegroups.com> <DYseZ48yZ4i4Yyuma@bongo-ra.co>
Injection-Date: Wed, 2 Aug 2023 12:30:37 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="04488a090e8d5356e827878369c1b94f";
logging-data="83693"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19V+by2oNAI94M0YxQww+mIYd8ZO4QcbsY="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.4.6-200.fc38.x86_64 (x86_64))
Cancel-Lock: sha1:zB72Tc+60Pt8gL7B+kmdp9pt/HU=
 by: Kalevi Kolttonen - Wed, 2 Aug 2023 12:30 UTC

Spiros Bousbouras <spibou@gmail.com> wrote:
> gets() was deprecated in the 1999 C standard and was removed
> in the 2011 standard.

The manual page for gets(3) says the following on Fedora 38:

==================================================================
Never use gets(). Because it is impossible to tell without knowing
the data in advance how many characters gets() will read, and
because gets() will continue to store characters past the end of
the buffer, it is extremely dangerous to use. It has been used to
break computer security. Use fgets() instead.

For more information, see CWE-242 (aka "Use of Inherently Dangerous
Function") at http://cwe.mitre.org/data/definitions/242.html
==================================================================

gets() was a big mistake right from the start. It should not
have been invented at all, but the C Standard Library designers
were human and unfortunately they could not conceive a perfect
set of functions.

Another useless but not dangerous C function is creat(2). There
is no point in having it, since open(2) suffices.

Anyway, all C programmers have avoided cursed gets(3) function
for decades.

br,
KK

Re: Security considerations for standard input

<094e993f-a269-4243-9cd8-26a413f5db81n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ad4:55d1:0:b0:63d:60ec:9fc2 with SMTP id bt17-20020ad455d1000000b0063d60ec9fc2mr51757qvb.10.1690979492465;
Wed, 02 Aug 2023 05:31:32 -0700 (PDT)
X-Received: by 2002:a05:6808:130e:b0:3a3:c78e:d863 with SMTP id
y14-20020a056808130e00b003a3c78ed863mr26307036oiv.0.1690979492139; Wed, 02
Aug 2023 05:31:32 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Wed, 2 Aug 2023 05:31:31 -0700 (PDT)
In-Reply-To: <DYseZ48yZ4i4Yyuma@bongo-ra.co>
Injection-Info: google-groups.googlegroups.com; posting-host=2603:3005:b2a:c100:1c0f:26c8:862f:c870;
posting-account=UKzVQwoAAAC0p4fW4nFhSsDyRRVgSJiF
NNTP-Posting-Host: 2603:3005:b2a:c100:1c0f:26c8:862f:c870
References: <ec282885-9283-4a75-89e5-6aa5829c9528n@googlegroups.com>
<1b4a601a-8810-490f-9e35-f1be696482a6n@googlegroups.com> <DYseZ48yZ4i4Yyuma@bongo-ra.co>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <094e993f-a269-4243-9cd8-26a413f5db81n@googlegroups.com>
Subject: Re: Security considerations for standard input
From: feenb...@gmail.com (Daniel Feenberg)
Injection-Date: Wed, 02 Aug 2023 12:31:32 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2279
 by: Daniel Feenberg - Wed, 2 Aug 2023 12:31 UTC

Thanks to everyone for all the discussion. It looks like Fortran is immune under the conditions I specified. (all I/O is to "(*,*)", there are no open or close statements and no other calls to the system) there are probably no possibilities for user input to result in executing arbitrary code. I do compile with subscript checking, but that is only one way to reference memory improperly. The only worrisome comment is the note that the stack is executable in Linux, but without a buffer overflow or format string attack, it may be impossible to get intrusion code onto the stack. It would be remarkable if an input statement could affect (for example) the value of a subroutine name passed as an argument to a subroutine.

I did try compiling "read(*,*) a" and feeding it a few billion spaces. It didn't disturb anything. so I believe gfortran at least is discarding the input it doesn't need to evaluate.

Again, thanks to everyone.

Re: Security considerations for standard input

<uaj4rk$1pqva$2@newsreader4.netcologne.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd6-24d2-0-b5ab-ca5d-210-25b1.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: Security considerations for standard input
Date: Fri, 4 Aug 2023 15:18:12 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <uaj4rk$1pqva$2@newsreader4.netcologne.de>
References: <ec282885-9283-4a75-89e5-6aa5829c9528n@googlegroups.com>
<1b4a601a-8810-490f-9e35-f1be696482a6n@googlegroups.com>
<DYseZ48yZ4i4Yyuma@bongo-ra.co> <uadi9c$2hnd$1@dont-email.me>
Injection-Date: Fri, 4 Aug 2023 15:18:12 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd6-24d2-0-b5ab-ca5d-210-25b1.ipv6dyn.netcologne.de:2001:4dd6:24d2:0:b5ab:ca5d:210:25b1";
logging-data="1895402"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Fri, 4 Aug 2023 15:18 UTC

Kalevi Kolttonen <kalevi@kolttonen.fi> schrieb:
> Spiros Bousbouras <spibou@gmail.com> wrote:
>> gets() was deprecated in the 1999 C standard and was removed
>> in the 2011 standard.
>
> The manual page for gets(3) says the following on Fedora 38:
>
>==================================================================
> Never use gets(). Because it is impossible to tell without knowing
> the data in advance how many characters gets() will read, and
> because gets() will continue to store characters past the end of
> the buffer, it is extremely dangerous to use. It has been used to
> break computer security. Use fgets() instead.

I wrote that part :-)

Re: Security considerations for standard input

<uakr6b$1le56$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.lang.fortran
Subject: Re: Security considerations for standard input
Date: Sat, 5 Aug 2023 06:45:31 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 7
Sender: <untosten@0.0.0.0>
Distribution: world
Message-ID: <uakr6b$1le56$1@dont-email.me>
References: <ec282885-9283-4a75-89e5-6aa5829c9528n@googlegroups.com> <1b4a601a-8810-490f-9e35-f1be696482a6n@googlegroups.com> <DYseZ48yZ4i4Yyuma@bongo-ra.co> <uadi9c$2hnd$1@dont-email.me> <uaj4rk$1pqva$2@newsreader4.netcologne.de>
Injection-Date: Sat, 5 Aug 2023 06:45:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="28401c494e884e227ebf903f7fe0ad66";
logging-data="1751206"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX190Pah2x7pxn9JQyCI76CGGNTPvdZBukFY="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.4.7-200.fc38.x86_64 (x86_64))
Cancel-Lock: sha1:b8JyKiBGmmaFVh1RaoEQM+z0mtQ=
 by: Kalevi Kolttonen - Sat, 5 Aug 2023 06:45 UTC

Thomas Koenig <tkoenig@netcologne.de> wrote:
> I wrote that part :-)

Well done. It is a very clear warning.

br,
KK

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor