Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Q: What's tiny and yellow and very, very, dangerous? A: A canary with the super-user password.


comp / comp.unix.programmer / Re: security by kees-cookity [rant]

SubjectAuthor
* security by kees-cookity [rant]Rainer Weikusat
`* Re: security by kees-cookity [rant]Kaz Kylheku
 `* Re: security by kees-cookity [rant]Rainer Weikusat
  +- Re: security by kees-cookity [rant]Muttley
  `* Re: security by kees-cookity [rant]Richard Kettlewell
   `* Re: security by kees-cookity [rant]Rainer Weikusat
    `* Re: security by kees-cookity [rant]Richard Kettlewell
     +- Re: security by kees-cookity [rant]Rainer Weikusat
     `* Re: security by kees-cookity [rant]John Ames
      +- Re: security by kees-cookity [rant]Kaz Kylheku
      +* Re: security by kees-cookity [rant]John Ames
      |`* Re: security by kees-cookity [rant]Rainer Weikusat
      | `* Re: security by kees-cookity [rant]Muttley
      |  `* Re: security by kees-cookity [rant]Nicolas George
      |   +* Re: security by kees-cookity [rant]Scott Lurndal
      |   |+* Re: security by kees-cookity [rant]Rainer Weikusat
      |   ||+* Re: security by kees-cookity [rant]Muttley
      |   |||+* Re: security by kees-cookity [rant]Scott Lurndal
      |   ||||`- Re: security by kees-cookity [rant]Muttley
      |   |||`* Re: security by kees-cookity [rant]Rainer Weikusat
      |   ||| `* Re: security by kees-cookity [rant]Muttley
      |   |||  `* Re: security by kees-cookity [rant]Rainer Weikusat
      |   |||   `* Re: security by kees-cookity [rant]Muttley
      |   |||    `* Re: security by kees-cookity [rant]Rainer Weikusat
      |   |||     `* Re: security by kees-cookity [rant]Muttley
      |   |||      `- Re: security by kees-cookity [rant]Rainer Weikusat
      |   ||`* Re: security by kees-cookity [rant]Keith Thompson
      |   || `* create temporary files (was: security by kees-cookity [rant])Rainer Weikusat
      |   ||  `- Re: create temporary files (was: security by kees-cookity [rant])Scott Lurndal
      |   |`- Re: security by kees-cookity [rant]James Kuyper
      |   `* Re: security by kees-cookity [rant]Muttley
      |    `* Re: security by kees-cookity [rant]Nicolas George
      |     `* Re: security by kees-cookity [rant]Muttley
      |      +- Re: security by kees-cookity [rant]Muttley
      |      `* Re: security by kees-cookity [rant]Nicolas George
      |       `* Re: security by kees-cookity [rant]Muttley
      |        `* Re: security by kees-cookity [rant]Nicolas George
      |         `- Re: security by kees-cookity [rant]John Ames
      `* Re: security by kees-cookity [rant]Richard Kettlewell
       +* Re: security by kees-cookity [rant]John Ames
       |`* Re: security by kees-cookity [rant]Richard Kettlewell
       | `* Re: security by kees-cookity [rant]John Ames
       |  `* Re: security by kees-cookity [rant]Richard Kettlewell
       |   `* Re: security by kees-cookity [rant]Rainer Weikusat
       |    `* Re: security by kees-cookity [rant]Richard Kettlewell
       |     +- Re: security by kees-cookity [rant]Rainer Weikusat
       |     `- Re: security by kees-cookity [rant]John Ames
       `- Re: security by kees-cookity [rant]Kaz Kylheku

Pages:12
Subject: Re: security by kees-cookity [rant]
From: John Ames
Newsgroups: comp.unix.programmer
Organization: A noiseless patient Spider
Date: Wed, 29 May 2024 20:05 UTC
References: 1 2 3 4 5 6 7 8 9 10
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: commodorejohn@gmail.com (John Ames)
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Wed, 29 May 2024 13:05:03 -0700
Organization: A noiseless patient Spider
Lines: 64
Message-ID: <20240529130503.00007214@gmail.com>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com>
<20240523182552.895@kylheku.com>
<87pltb2pju.fsf@doppelsaurus.mobileactivedefense.com>
<wwvzfse59dd.fsf@LkoBDZeT.terraraq.uk>
<87h6ekhlte.fsf@doppelsaurus.mobileactivedefense.com>
<wwvfru3y8dp.fsf@LkoBDZeT.terraraq.uk>
<20240528075707.00004bcf@gmail.com>
<wwv1q5ljbv9.fsf@LkoBDZeT.terraraq.uk>
<20240529074426.00000142@gmail.com>
<wwvo78o3807.fsf@LkoBDZeT.terraraq.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 29 May 2024 22:05:06 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="38d6fab78ec32119edceaa2b190e6e24";
logging-data="1319220"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19LGxxe8Hk03gsSn+Q3O0jbo/lXeFq2308="
Cancel-Lock: sha1:RI5x4fERokRWHnNgdZd8utpBWlI=
X-Newsreader: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-w64-mingw32)
View all headers

On Wed, 29 May 2024 17:20:08 +0100
Richard Kettlewell <invalid@invalid.invalid> wrote:

> John Ames <commodorejohn@gmail.com> writes:
> > Minimal-assistance-in-the-absence-of-direct-supervision is a *very*
> > different thing from intelligent-override-of-deliberate-action.
>
> I think some automated braking for goalposts is needed here.

Let me come back at my point, then: security precautions predicated on
the assumption that an Authorized Person is not operating in good faith
and due diligence concordant with their level of authorization suffer
from severe diminishing returns with each additional layer of safeguard
and may even reach a point where they're *counterproductive.*

Restricting the ability to install software to a designated group of
administrators, f'rexample, is a perfectly sensible thing to do,
especially in a large shared system. But once you've created such a
group, assessing whether a given individual is trustworthy and
knowledgeable enough to be a member of it is an organizational problem,
*not* a technical one.

Some measure of safeguarding may still be worth the bother despite this
(while Windows's "hey, you got this thing off the Interwebs, you sure
'sokay?" prompts annoy me personally, I can see the logic behind them,)
but every additional layer calls further into question what the point
of even having the group is in the first place, and whether *anyone*
should really be a member of it. If not, why did you let them in? If
so, why are you hampering their ability to exercise that authority?

This has become semi-famously an issue in medical software, for
instance. Developers of some major EMR systems, driven by regulatory
and legal CYA concerns, have put so many are-you-sure and please-
acknowledge-XYZ prompts into their core workflow that doctors (who are,
shockingly, only human) end up clicking through them machine-gun style,
and pay *less* attention to the actually critical stuff than they
would've if it weren't buried in an avalanche of white noise.

And doctors aren't software specialists; sysadmins *are.* Throw too
many safeguards in the path of a sysadmin just trying to get shit done,
and you don't end up with a sysadmin forced to question whether they
really *are* sure, or even a sysadmin powering doctor-style through a
set of nagging little obstacles they aren't thinking about; you end up
with a sysadmin who will - guaranteed - develop a process of *disabling
the entire safeguard system* for the duration of the job, and then (if
you're lucky) re-enabling it afterward.

We saw exactly that with UAC in Windows Vista; it was so bad that the #1
method for dealing with it was to disable it entirely, and people were
so burned by it that that remained true *well* into the Win10 era,
despite MS's attempts to temper it into some measure of reasonability.

So no, I don't think that a couple examples of minimal assistance in
situations where direct supervision is either absent or impaired *do*
constitute a hard-and-fast argument against temperance in security
design as a general principle. Sometimes a little extra safety is worth
it, sometimes not; and sometimes you're actually shooting yourself in
the foot.

And if I had to place my bets on where changing the behavior of
fundamental system calls in a major OS family where they've been
standard since the '70s lies on that spectrum...well, it's not gonna be
in the "worth it" zone.

Subject: Re: security by kees-cookity [rant]
From: Rainer Weikusat
Newsgroups: comp.unix.programmer
Date: Wed, 29 May 2024 20:42 UTC
References: 1 2 3 4 5 6 7 8 9 10
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: rweikusat@talktalk.net (Rainer Weikusat)
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Wed, 29 May 2024 21:42:47 +0100
Lines: 28
Message-ID: <874jag5ozc.fsf@doppelsaurus.mobileactivedefense.com>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com>
<wwvfru3y8dp.fsf@LkoBDZeT.terraraq.uk>
<20240528075707.00004bcf@gmail.com>
<20240528103438.00005f0b@gmail.com>
<87v82xpsxr.fsf@doppelsaurus.mobileactivedefense.com>
<v36kd8$11r1b$1@dont-email.me> <66574c1c$0$8220$426a74cc@news.free.fr>
<0oI5O.7253$gkW.1029@fx40.iad>
<878qzs5yq3.fsf@doppelsaurus.mobileactivedefense.com>
<v37ojn$1821q$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net RENubs4KIYfGHw6uBv1rzwowlsgZ4nERXvTFLi3zIe+CZcpKY=
Cancel-Lock: sha1:EyYGJcU8fvvyGL4/Et/mxFFePqg= sha1:GycpsxOEKnWJYUe7yYYwtIui9iY= sha256:kzoIrjP59hyBLeYVeUYkZhCdVM5SQc43szNU2SDuYxw=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
View all headers

Muttley@dastardlyhq.com writes:
> Rainer Weikusat <rweikusat@talktalk.net> wrote:
>>scott@slp53.sl.home (Scott Lurndal) writes:
>>> Nicolas George <nicolas$george@salle-s.org> writes:
>>>>Muttley@dastardlyhq.com, dans le message <v36kd8$11r1b$1@dont-email.me>,
>>>> a écrit :
>>>>> The simple answer being that no process uses /tmp unless it needs to share
>>>>> data with another via files.
>>>>
>>>>So where should they put their temporary files?
>>>
>>> $ mkdir ${TMPDIR}/${LOGNAME} && chown 1700 ${TMPDIR}/${LOGNAME}
>>>
>>> Note that /tmp and /var/tmp usually have the "Sticky" mode bit
>>> set which limits the operations that a non-owner can
>>> perform on a file in that directory.
>>
>>This solves only half of the problem: mkdir will fail if the given
>>filesystem name already exists. Some scheme to create unguessable names
>>and try using them until success would still be needed on top of that.
>
> Process id + time and date down to the microsecond in the filename usually
> solves that problem. If multi threaded then throw in the thread id too.
> Creating unique filenames isn't a problem so long as everyone sticks to the
> scheme.

BASE64-encoding a random number would also work. But I didn't claim this
would be particularly complicated, just that it needed to be done.

Subject: Re: security by kees-cookity [rant]
From: Nicolas George
Newsgroups: comp.unix.programmer
Organization: Guest of ProXad - France
Date: Wed, 29 May 2024 21:48 UTC
References: 1 2 3 4 5 6
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed4-a.proxad.net!nnrp3-2.free.fr!not-for-mail
Newsgroups: comp.unix.programmer
From: nicolas$george@salle-s.org (Nicolas George)
Subject: Re: security by kees-cookity [rant]
Sender: george@phare.invalid (Nicolas George)
X-Newsreader: Flrn (0.9.20070704)
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com> <20240528103438.00005f0b@gmail.com> <87v82xpsxr.fsf@doppelsaurus.mobileactivedefense.com> <v36kd8$11r1b$1@dont-email.me> <66574c1c$0$8220$426a74cc@news.free.fr> <v37no9$17tpi$1@dont-email.me>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=iso-8859-1
Date: 29 May 2024 21:48:57 GMT
Lines: 8
Message-ID: <6657a2c9$0$2560$426a34cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 29 May 2024 23:48:57 CEST
NNTP-Posting-Host: 129.199.129.80
X-Trace: 1717019337 news-4.free.fr 2560 129.199.129.80:35106
X-Complaints-To: abuse@proxad.net
View all headers

Muttley@dastardlyhq.com, dans le message <v37no9$17tpi$1@dont-email.me>,
a écrit :
> Create a dot directory in the users home dir

So you suggest to use for temporary files a place where space might be
limited, and/or slow, and/or with expensive writes?

That's rather bad design.

Subject: Re: security by kees-cookity [rant]
From: Keith Thompson
Newsgroups: comp.unix.programmer
Organization: None to speak of
Date: Wed, 29 May 2024 23:22 UTC
References: 1 2 3 4 5 6 7 8 9
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Wed, 29 May 2024 16:22:43 -0700
Organization: None to speak of
Lines: 34
Message-ID: <87o78oxkxo.fsf@nosuchdomain.example.com>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com>
<wwvfru3y8dp.fsf@LkoBDZeT.terraraq.uk>
<20240528075707.00004bcf@gmail.com>
<20240528103438.00005f0b@gmail.com>
<87v82xpsxr.fsf@doppelsaurus.mobileactivedefense.com>
<v36kd8$11r1b$1@dont-email.me> <66574c1c$0$8220$426a74cc@news.free.fr>
<0oI5O.7253$gkW.1029@fx40.iad>
<878qzs5yq3.fsf@doppelsaurus.mobileactivedefense.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 30 May 2024 01:22:50 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="67a225b34118f73f85214d544a81c3a9";
logging-data="1428947"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19YZ9k1nAF3/K107d3hBLUr"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:fMeDLOX6bYWnXaD7RqeCfrMYTpM=
sha1:XlDW717oz0t0t6kRDgIyxzW8WIY=
View all headers

Rainer Weikusat <rweikusat@talktalk.net> writes:
> scott@slp53.sl.home (Scott Lurndal) writes:
>> Nicolas George <nicolas$george@salle-s.org> writes:
>>>Muttley@dastardlyhq.com, dans le message <v36kd8$11r1b$1@dont-email.me>,
>>> a écrit :
>>>> The simple answer being that no process uses /tmp unless it needs to share
>>>> data with another via files.
>>>
>>>So where should they put their temporary files?
>>
>> $ mkdir ${TMPDIR}/${LOGNAME} && chown 1700 ${TMPDIR}/${LOGNAME}
>>
>> Note that /tmp and /var/tmp usually have the "Sticky" mode bit
>> set which limits the operations that a non-owner can
>> perform on a file in that directory.
>
> This solves only half of the problem: mkdir will fail if the given
> filesystem name already exists. Some scheme to create unguessable names
> and try using them until success would still be needed on top of that.

`mkdir -p` solves that part of the problem. But what if somebody else
has created a directory whose name happens to match your ${LOGNAME}?
It's a convention that works only if everyone follows it.

As Scott Lurndal points out, this is what mktemp(1) is for.

Also, I don't have $TMPDIR in my environment.

(As for $LOGNAME, I usually use $USER, but I see that POSIX only
specifies $LOGNAME so that's probably safer.)

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

Subject: create temporary files (was: security by kees-cookity [rant])
From: Rainer Weikusat
Newsgroups: comp.unix.programmer
Date: Thu, 30 May 2024 11:53 UTC
References: 1 2 3 4 5 6 7 8 9 10
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: rweikusat@talktalk.net (Rainer Weikusat)
Newsgroups: comp.unix.programmer
Subject: create temporary files (was: security by kees-cookity [rant])
Date: Thu, 30 May 2024 12:53:36 +0100
Lines: 40
Message-ID: <87sexzms73.fsf_-_@doppelsaurus.mobileactivedefense.com>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com>
<wwvfru3y8dp.fsf@LkoBDZeT.terraraq.uk>
<20240528075707.00004bcf@gmail.com>
<20240528103438.00005f0b@gmail.com>
<87v82xpsxr.fsf@doppelsaurus.mobileactivedefense.com>
<v36kd8$11r1b$1@dont-email.me> <66574c1c$0$8220$426a74cc@news.free.fr>
<0oI5O.7253$gkW.1029@fx40.iad>
<878qzs5yq3.fsf@doppelsaurus.mobileactivedefense.com>
<87o78oxkxo.fsf@nosuchdomain.example.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net ggfwupSdjKhRLAxYeE5TgghzLioocGebP0r4XpAcTyn4kqbmg=
Cancel-Lock: sha1:DDVv9ZYa+rJsUdGlf8TquTi7rGs= sha1:RYB4HbrpLBvaeXiy8atxiPtqNmY= sha256:hq+nsvNwlyVmvTiuh/i8zo5lYlk8Q5P3ICv1SuRGpIg=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
View all headers

Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
> Rainer Weikusat <rweikusat@talktalk.net> writes:
>> scott@slp53.sl.home (Scott Lurndal) writes:
>>> Nicolas George <nicolas$george@salle-s.org> writes:
>>>>Muttley@dastardlyhq.com, dans le message <v36kd8$11r1b$1@dont-email.me>,
>>>> a écrit :
>>>>> The simple answer being that no process uses /tmp unless it needs to share
>>>>> data with another via files.
>>>>
>>>>So where should they put their temporary files?
>>>
>>> $ mkdir ${TMPDIR}/${LOGNAME} && chown 1700 ${TMPDIR}/${LOGNAME}
>>>
>>> Note that /tmp and /var/tmp usually have the "Sticky" mode bit
>>> set which limits the operations that a non-owner can
>>> perform on a file in that directory.
>>
>> This solves only half of the problem: mkdir will fail if the given
>> filesystem name already exists. Some scheme to create unguessable names
>> and try using them until success would still be needed on top of that.
>
> `mkdir -p` solves that part of the problem.

That's not a problem. It's an important featue of a partial solution.

> But what if somebody else
> has created a directory whose name happens to match your ${LOGNAME}?
> It's a convention that works only if everyone follows it.
>
> As Scott Lurndal points out, this is what mktemp(1) is for.

Or mkstemp or tmpfile. On Linux (since 3.11), there's also an O_TMPFILE
open flag which creates a namless open file in some directory (passed as
pathname argument to open). It's also not really complicated to do this
with plain open:

1. Generate a 'hard to guess' name
2. Try opening with O_CREAT | O_EXCL
3. Success? => return fd
4. goto 1

Subject: Re: create temporary files (was: security by kees-cookity [rant])
From: Scott Lurndal
Newsgroups: comp.unix.programmer
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 30 May 2024 13:55 UTC
References: 1 2 3 4 5 6 7 8 9 10 11
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!news.swapon.de!news.in-chemnitz.de!3.eu.feeder.erje.net!feeder.erje.net!npeer.as286.net!npeer-ng0.as286.net!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx45.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: create temporary files (was: security by kees-cookity [rant])
Newsgroups: comp.unix.programmer
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com> <wwvfru3y8dp.fsf@LkoBDZeT.terraraq.uk> <20240528075707.00004bcf@gmail.com> <20240528103438.00005f0b@gmail.com> <87v82xpsxr.fsf@doppelsaurus.mobileactivedefense.com> <v36kd8$11r1b$1@dont-email.me> <66574c1c$0$8220$426a74cc@news.free.fr> <0oI5O.7253$gkW.1029@fx40.iad> <878qzs5yq3.fsf@doppelsaurus.mobileactivedefense.com> <87o78oxkxo.fsf@nosuchdomain.example.com> <87sexzms73.fsf_-_@doppelsaurus.mobileactivedefense.com>
Lines: 46
Message-ID: <Nz%5O.1028$nd%8.958@fx45.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 30 May 2024 13:55:57 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 30 May 2024 13:55:57 GMT
X-Received-Bytes: 3075
View all headers

Rainer Weikusat <rweikusat@talktalk.net> writes:
>Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>> Rainer Weikusat <rweikusat@talktalk.net> writes:
>>> scott@slp53.sl.home (Scott Lurndal) writes:
>>>> Nicolas George <nicolas$george@salle-s.org> writes:
>>>>>Muttley@dastardlyhq.com, dans le message <v36kd8$11r1b$1@dont-email.me>,
>>>>> a écrit :
>>>>>> The simple answer being that no process uses /tmp unless it needs to share
>>>>>> data with another via files.
>>>>>
>>>>>So where should they put their temporary files?
>>>>
>>>> $ mkdir ${TMPDIR}/${LOGNAME} && chown 1700 ${TMPDIR}/${LOGNAME}
>>>>
>>>> Note that /tmp and /var/tmp usually have the "Sticky" mode bit
>>>> set which limits the operations that a non-owner can
>>>> perform on a file in that directory.
>>>
>>> This solves only half of the problem: mkdir will fail if the given
>>> filesystem name already exists. Some scheme to create unguessable names
>>> and try using them until success would still be needed on top of that.
>>
>> `mkdir -p` solves that part of the problem.
>
>That's not a problem. It's an important featue of a partial solution.
>
>> But what if somebody else
>> has created a directory whose name happens to match your ${LOGNAME}?
>> It's a convention that works only if everyone follows it.
>>
>> As Scott Lurndal points out, this is what mktemp(1) is for.
>
>Or mkstemp or tmpfile. On Linux (since 3.11), there's also an O_TMPFILE
>open flag which creates a namless open file in some directory (passed as
>pathname argument to open). It's also not really complicated to do this
>with plain open:
>
>1. Generate a 'hard to guess' name
>2. Try opening with O_CREAT | O_EXCL
>3. Success? => return fd
>4. goto 1

0. Use the mkdirat(2) system call rather than mkdir(2) when
creating the subdirectory in ${TMPDIR:-/tmp}. It may
be that the library functions backing mktemp et al already do
this...

Subject: Re: security by kees-cookity [rant]
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.programmer
Organization: A noiseless patient Spider
Date: Fri, 31 May 2024 07:26 UTC
References: 1 2 3 4 5 6 7 8 9 10 11
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Fri, 31 May 2024 07:26:41 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <v3bu3h$24ou0$1@dont-email.me>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com>
<wwvfru3y8dp.fsf@LkoBDZeT.terraraq.uk>
<20240528075707.00004bcf@gmail.com>
<20240528103438.00005f0b@gmail.com>
<87v82xpsxr.fsf@doppelsaurus.mobileactivedefense.com>
<v36kd8$11r1b$1@dont-email.me> <66574c1c$0$8220$426a74cc@news.free.fr>
<0oI5O.7253$gkW.1029@fx40.iad>
<878qzs5yq3.fsf@doppelsaurus.mobileactivedefense.com>
<v37ojn$1821q$1@dont-email.me>
<874jag5ozc.fsf@doppelsaurus.mobileactivedefense.com>
Injection-Date: Fri, 31 May 2024 09:26:41 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c8a42d5389850ffb5f097278eb6ce67c";
logging-data="2253760"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19dLwZm/CTc26/DzEtf1Xgz"
Cancel-Lock: sha1:xz59NR2vUDP47IBABC25pJHfFAs=
View all headers

On Wed, 29 May 2024 21:42:47 +0100
Rainer Weikusat <rweikusat@talktalk.net> wrote:
>Muttley@dastardlyhq.com writes:
>> Rainer Weikusat <rweikusat@talktalk.net> wrote:
>>>scott@slp53.sl.home (Scott Lurndal) writes:
>>>> Nicolas George <nicolas$george@salle-s.org> writes:
>>>>>Muttley@dastardlyhq.com, dans le message <v36kd8$11r1b$1@dont-email.me>,
>>>>> a écrit :
>>>>>> The simple answer being that no process uses /tmp unless it needs to
>share
>>>>>> data with another via files.
>>>>>
>>>>>So where should they put their temporary files?
>>>>
>>>> $ mkdir ${TMPDIR}/${LOGNAME} && chown 1700 ${TMPDIR}/${LOGNAME}
>>>>
>>>> Note that /tmp and /var/tmp usually have the "Sticky" mode bit
>>>> set which limits the operations that a non-owner can
>>>> perform on a file in that directory.
>>>
>>>This solves only half of the problem: mkdir will fail if the given
>>>filesystem name already exists. Some scheme to create unguessable names
>>>and try using them until success would still be needed on top of that.
>>
>> Process id + time and date down to the microsecond in the filename usually
>> solves that problem. If multi threaded then throw in the thread id too.
>> Creating unique filenames isn't a problem so long as everyone sticks to the
>> scheme.
>
>BASE64-encoding a random number would also work. But I didn't claim this
>would be particularly complicated, just that it needed to be done.

Always the danger of a collision if both programs seeded the sequence with
the same value, albeit very small.

Subject: Re: security by kees-cookity [rant]
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.programmer
Organization: A noiseless patient Spider
Date: Fri, 31 May 2024 07:27 UTC
References: 1 2 3 4 5 6 7
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Fri, 31 May 2024 07:27:53 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <v3bu5o$24p7r$1@dont-email.me>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com> <20240528103438.00005f0b@gmail.com> <87v82xpsxr.fsf@doppelsaurus.mobileactivedefense.com> <v36kd8$11r1b$1@dont-email.me> <66574c1c$0$8220$426a74cc@news.free.fr> <v37no9$17tpi$1@dont-email.me> <6657a2c9$0$2560$426a34cc@news.free.fr>
Injection-Date: Fri, 31 May 2024 09:27:53 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c8a42d5389850ffb5f097278eb6ce67c";
logging-data="2254075"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18YsMicBv8YuKUxJnXqY5nf"
Cancel-Lock: sha1:nypaYWptwgaknXIEHE+DMQmBYxI=
View all headers

On 29 May 2024 21:48:57 GMT
Nicolas George <nicolas$george@salle-s.org> wrote:
>Muttley@dastardlyhq.com, dans le message <v37no9$17tpi$1@dont-email.me>,
> a �crit�:
>> Create a dot directory in the users home dir
>
>So you suggest to use for temporary files a place where space might be
>limited, and/or slow, and/or with expensive writes?
>
>That's rather bad design.

You conveniently snipped the bit where I mentioned quotas. However you might
want to take a look in your home directory at all the . files (and some not)
and look at what various desktop apps dump there. Eg Various browsers save
megabytes of cache data.

Subject: Re: security by kees-cookity [rant]
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.programmer
Organization: A noiseless patient Spider
Date: Fri, 31 May 2024 07:43 UTC
References: 1 2 3 4 5 6 7 8
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Fri, 31 May 2024 07:43:07 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <v3bv2b$24uh1$1@dont-email.me>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com> <20240528103438.00005f0b@gmail.com> <87v82xpsxr.fsf@doppelsaurus.mobileactivedefense.com> <v36kd8$11r1b$1@dont-email.me> <66574c1c$0$8220$426a74cc@news.free.fr> <v37no9$17tpi$1@dont-email.me> <6657a2c9$0$2560$426a34cc@news.free.fr> <v3bu5o$24p7r$1@dont-email.me>
Injection-Date: Fri, 31 May 2024 09:43:08 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c8a42d5389850ffb5f097278eb6ce67c";
logging-data="2259489"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+OvXYC3X+MoMubM1rsCkAS"
Cancel-Lock: sha1:or4zJsw77FrOgDPZwnPcmTru3o8=
View all headers

On Fri, 31 May 2024 07:27:53 -0000 (UTC)
Muttley@dastardlyhq.com wrote:
>On 29 May 2024 21:48:57 GMT
>Nicolas George <nicolas$george@salle-s.org> wrote:
>>Muttley@dastardlyhq.com, dans le message <v37no9$17tpi$1@dont-email.me>,
>> a �crit�:
>>> Create a dot directory in the users home dir
>>
>>So you suggest to use for temporary files a place where space might be
>>limited, and/or slow, and/or with expensive writes?
>>
>>That's rather bad design.
>
>You conveniently snipped the bit where I mentioned quotas. However you might
>want to take a look in your home directory at all the . files (and some not)
>and look at what various desktop apps dump there. Eg Various browsers save
>megabytes of cache data.
>

I meant . directories obv.

Subject: Re: security by kees-cookity [rant]
From: Nicolas George
Newsgroups: comp.unix.programmer
Organization: Guest of ProXad - France
Date: Fri, 31 May 2024 08:59 UTC
References: 1 2 3 4 5 6
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed2-b.proxad.net!nnrp3-2.free.fr!not-for-mail
Newsgroups: comp.unix.programmer
From: nicolas$george@salle-s.org (Nicolas George)
Subject: Re: security by kees-cookity [rant]
Sender: george@phare.invalid (Nicolas George)
X-Newsreader: Flrn (0.9.20070704)
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com> <v36kd8$11r1b$1@dont-email.me> <66574c1c$0$8220$426a74cc@news.free.fr> <v37no9$17tpi$1@dont-email.me> <6657a2c9$0$2560$426a34cc@news.free.fr> <v3bu5o$24p7r$1@dont-email.me>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=iso-8859-1
Date: 31 May 2024 08:59:37 GMT
Lines: 5
Message-ID: <66599179$0$2568$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 31 May 2024 10:59:37 CEST
NNTP-Posting-Host: 129.199.129.80
X-Trace: 1717145977 news-1.free.fr 2568 129.199.129.80:47328
X-Complaints-To: abuse@proxad.net
View all headers

Muttley@dastardlyhq.com, dans le message <v3bu5o$24p7r$1@dont-email.me>,
a écrit :
> You conveniently snipped the bit where I mentioned quotas.

Indeed: it did not make your suggestion better.

Subject: Re: security by kees-cookity [rant]
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.programmer
Organization: A noiseless patient Spider
Date: Fri, 31 May 2024 10:57 UTC
References: 1 2 3 4 5 6 7
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Fri, 31 May 2024 10:57:47 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <v3cafb$26qfs$1@dont-email.me>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com> <v36kd8$11r1b$1@dont-email.me> <66574c1c$0$8220$426a74cc@news.free.fr> <v37no9$17tpi$1@dont-email.me> <6657a2c9$0$2560$426a34cc@news.free.fr> <v3bu5o$24p7r$1@dont-email.me> <66599179$0$2568$426a74cc@news.free.fr>
Injection-Date: Fri, 31 May 2024 12:57:47 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c8a42d5389850ffb5f097278eb6ce67c";
logging-data="2320892"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19CIr1h5P+zAnkwXXtS5uap"
Cancel-Lock: sha1:+Q8Ua1XMdWMoOjgSAQsqwh6BGyA=
View all headers

On 31 May 2024 08:59:37 GMT
Nicolas George <nicolas$george@salle-s.org> wrote:
>Muttley@dastardlyhq.com, dans le message <v3bu5o$24p7r$1@dont-email.me>,
> a �crit�:
>> You conveniently snipped the bit where I mentioned quotas.
>
>Indeed: it did not make your suggestion better.

My suggestion is how a lot of modern applications work whether you like it or
not.

Subject: Re: security by kees-cookity [rant]
From: Nicolas George
Newsgroups: comp.unix.programmer
Organization: Guest of ProXad - France
Date: Fri, 31 May 2024 13:15 UTC
References: 1 2 3 4 5 6
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-b.proxad.net!nnrp6-1.free.fr!not-for-mail
Newsgroups: comp.unix.programmer
From: nicolas$george@salle-s.org (Nicolas George)
Subject: Re: security by kees-cookity [rant]
Sender: george@phare.invalid (Nicolas George)
X-Newsreader: Flrn (0.9.20070704)
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com> <v37no9$17tpi$1@dont-email.me> <6657a2c9$0$2560$426a34cc@news.free.fr> <v3bu5o$24p7r$1@dont-email.me> <66599179$0$2568$426a74cc@news.free.fr> <v3cafb$26qfs$1@dont-email.me>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=iso-8859-1
Date: 31 May 2024 13:15:52 GMT
Lines: 5
Message-ID: <6659cd88$0$7523$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 31 May 2024 15:15:52 CEST
NNTP-Posting-Host: 129.199.129.80
X-Trace: 1717161352 news-1.free.fr 7523 129.199.129.80:53892
X-Complaints-To: abuse@proxad.net
View all headers

Muttley@dastardlyhq.com, dans le message <v3cafb$26qfs$1@dont-email.me>,
a écrit :
> My suggestion is how a lot of modern applications work

Not the endorsement you think it is.

Subject: Re: security by kees-cookity [rant]
From: Rainer Weikusat
Newsgroups: comp.unix.programmer
Date: Fri, 31 May 2024 14:23 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: rweikusat@talktalk.net (Rainer Weikusat)
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Fri, 31 May 2024 15:23:35 +0100
Lines: 38
Message-ID: <87v82uoyag.fsf@doppelsaurus.mobileactivedefense.com>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com>
<wwvfru3y8dp.fsf@LkoBDZeT.terraraq.uk>
<20240528075707.00004bcf@gmail.com>
<20240528103438.00005f0b@gmail.com>
<87v82xpsxr.fsf@doppelsaurus.mobileactivedefense.com>
<v36kd8$11r1b$1@dont-email.me> <66574c1c$0$8220$426a74cc@news.free.fr>
<0oI5O.7253$gkW.1029@fx40.iad>
<878qzs5yq3.fsf@doppelsaurus.mobileactivedefense.com>
<v37ojn$1821q$1@dont-email.me>
<874jag5ozc.fsf@doppelsaurus.mobileactivedefense.com>
<v3bu3h$24ou0$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net cwL8fz6KUhMkzbXtVur8HAwCAQ3sZ5JuMIvzEUorfEFt9faYI=
Cancel-Lock: sha1:cR4a0GQDt8xW112rhd1W68uu6dk= sha1:EVcQOqBhGIrAuU/BJqgAsvZWI/w= sha256:lANeadH+3F02h6vZZ9MvNo23H6U5s2MlDW+P6zpqoK8=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
View all headers

Muttley@dastardlyhq.com writes:
> Rainer Weikusat <rweikusat@talktalk.net> wrote:
>>Muttley@dastardlyhq.com writes:
>>> Rainer Weikusat <rweikusat@talktalk.net> wrote:
>>>>scott@slp53.sl.home (Scott Lurndal) writes:
>>>>> Nicolas George <nicolas$george@salle-s.org> writes:
>>>>>>Muttley@dastardlyhq.com, dans le message <v36kd8$11r1b$1@dont-email.me>,
>>>>>> a écrit :
>>>>>>> The simple answer being that no process uses /tmp unless it needs to
>>share
>>>>>>> data with another via files.
>>>>>>
>>>>>>So where should they put their temporary files?
>>>>>
>>>>> $ mkdir ${TMPDIR}/${LOGNAME} && chown 1700 ${TMPDIR}/${LOGNAME}
>>>>>
>>>>> Note that /tmp and /var/tmp usually have the "Sticky" mode bit
>>>>> set which limits the operations that a non-owner can
>>>>> perform on a file in that directory.
>>>>
>>>>This solves only half of the problem: mkdir will fail if the given
>>>>filesystem name already exists. Some scheme to create unguessable names
>>>>and try using them until success would still be needed on top of that.
>>>
>>> Process id + time and date down to the microsecond in the filename usually
>>> solves that problem. If multi threaded then throw in the thread id too.
>>> Creating unique filenames isn't a problem so long as everyone sticks to the
>>> scheme.
>>
>>BASE64-encoding a random number would also work. But I didn't claim this
>>would be particularly complicated, just that it needed to be done.
>
> Always the danger of a collision if both programs seeded the sequence with
> the same value, albeit very small.

Regardless of the scheme that's employed, there's always a danger of
collisions, ie, of some other processing having created a file with this
name first.

Subject: Re: security by kees-cookity [rant]
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.programmer
Organization: A noiseless patient Spider
Date: Fri, 31 May 2024 14:39 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Fri, 31 May 2024 14:39:09 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <v3cned$291hd$1@dont-email.me>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com>
<wwvfru3y8dp.fsf@LkoBDZeT.terraraq.uk>
<20240528075707.00004bcf@gmail.com>
<20240528103438.00005f0b@gmail.com>
<87v82xpsxr.fsf@doppelsaurus.mobileactivedefense.com>
<v36kd8$11r1b$1@dont-email.me> <66574c1c$0$8220$426a74cc@news.free.fr>
<0oI5O.7253$gkW.1029@fx40.iad>
<878qzs5yq3.fsf@doppelsaurus.mobileactivedefense.com>
<v37ojn$1821q$1@dont-email.me>
<874jag5ozc.fsf@doppelsaurus.mobileactivedefense.com>
<v3bu3h$24ou0$1@dont-email.me>
<87v82uoyag.fsf@doppelsaurus.mobileactivedefense.com>
Injection-Date: Fri, 31 May 2024 16:39:09 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c8a42d5389850ffb5f097278eb6ce67c";
logging-data="2393645"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180jNXhVLD9fvsP0LTQaLTT"
Cancel-Lock: sha1:QVTbON0+Pi+BGPYJR7JtTEXFXkE=
View all headers

On Fri, 31 May 2024 15:23:35 +0100
Rainer Weikusat <rweikusat@talktalk.net> wrote:
>Muttley@dastardlyhq.com writes:
>> Rainer Weikusat <rweikusat@talktalk.net> wrote:
>>>Muttley@dastardlyhq.com writes:
>>>> Rainer Weikusat <rweikusat@talktalk.net> wrote:
>>>>>scott@slp53.sl.home (Scott Lurndal) writes:
>>>>>> Nicolas George <nicolas$george@salle-s.org> writes:
>>>>>>>Muttley@dastardlyhq.com, dans le message <v36kd8$11r1b$1@dont-email.me>,
>>>>>>> a écrit :
>>>>>>>> The simple answer being that no process uses /tmp unless it needs to
>>>share
>>>>>>>> data with another via files.
>>>>>>>
>>>>>>>So where should they put their temporary files?
>>>>>>
>>>>>> $ mkdir ${TMPDIR}/${LOGNAME} && chown 1700 ${TMPDIR}/${LOGNAME}
>>>>>>
>>>>>> Note that /tmp and /var/tmp usually have the "Sticky" mode bit
>>>>>> set which limits the operations that a non-owner can
>>>>>> perform on a file in that directory.
>>>>>
>>>>>This solves only half of the problem: mkdir will fail if the given
>>>>>filesystem name already exists. Some scheme to create unguessable names
>>>>>and try using them until success would still be needed on top of that.
>>>>
>>>> Process id + time and date down to the microsecond in the filename usually
>
>>>> solves that problem. If multi threaded then throw in the thread id too.
>>>> Creating unique filenames isn't a problem so long as everyone sticks to the
>
>>>> scheme.
>>>
>>>BASE64-encoding a random number would also work. But I didn't claim this
>>>would be particularly complicated, just that it needed to be done.
>>
>> Always the danger of a collision if both programs seeded the sequence with
>> the same value, albeit very small.
>
>Regardless of the scheme that's employed, there's always a danger of
>collisions, ie, of some other processing having created a file with this
>name first.

After a program has exited it has no claim to any temporary files so thats
a non issue.

Subject: Re: security by kees-cookity [rant]
From: John Ames
Newsgroups: comp.unix.programmer
Organization: A noiseless patient Spider
Date: Fri, 31 May 2024 15:01 UTC
References: 1 2 3 4 5 6 7
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: commodorejohn@gmail.com (John Ames)
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Fri, 31 May 2024 08:01:20 -0700
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <20240531080120.00003750@gmail.com>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com>
<v37no9$17tpi$1@dont-email.me>
<6657a2c9$0$2560$426a34cc@news.free.fr>
<v3bu5o$24p7r$1@dont-email.me>
<66599179$0$2568$426a74cc@news.free.fr>
<v3cafb$26qfs$1@dont-email.me>
<6659cd88$0$7523$426a74cc@news.free.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Injection-Date: Fri, 31 May 2024 17:01:23 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="c08e187fad7dfc95ac03a086fb0d8550";
logging-data="2376936"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+NM9vGai0t40/Jib7vyf1cCf2ZlGbIQho="
Cancel-Lock: sha1:AaRRGTEIq2RlRL9n+jRGjIdgXZ0=
X-Newsreader: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-w64-mingw32)
View all headers

On 31 May 2024 13:15:52 GMT
Nicolas George <nicolas$george@salle-s.org> wrote:

> Muttley@dastardlyhq.com, dans le message
> <v3cafb$26qfs$1@dont-email.me>, a écrit :
> > My suggestion is how a lot of modern applications work
>
> Not the endorsement you think it is.

Also not as true as all that, to begin with. While e.g. Chrome does
dump an irritating amount of junk in one's home directory, it's stuff
that has at least some reason for being persistent; it still uses /tmp
for genuinely transient stuff. Can attest, just had an errant program
fill up /tmp on me the other day, and Chromium wouldn't open 'til I
cleared it.

Subject: Re: security by kees-cookity [rant]
From: Rainer Weikusat
Newsgroups: comp.unix.programmer
Date: Fri, 31 May 2024 21:18 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: rweikusat@talktalk.net (Rainer Weikusat)
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Fri, 31 May 2024 22:18:16 +0100
Lines: 55
Message-ID: <87r0dhptnr.fsf@doppelsaurus.mobileactivedefense.com>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com>
<wwvfru3y8dp.fsf@LkoBDZeT.terraraq.uk>
<20240528075707.00004bcf@gmail.com>
<20240528103438.00005f0b@gmail.com>
<87v82xpsxr.fsf@doppelsaurus.mobileactivedefense.com>
<v36kd8$11r1b$1@dont-email.me> <66574c1c$0$8220$426a74cc@news.free.fr>
<0oI5O.7253$gkW.1029@fx40.iad>
<878qzs5yq3.fsf@doppelsaurus.mobileactivedefense.com>
<v37ojn$1821q$1@dont-email.me>
<874jag5ozc.fsf@doppelsaurus.mobileactivedefense.com>
<v3bu3h$24ou0$1@dont-email.me>
<87v82uoyag.fsf@doppelsaurus.mobileactivedefense.com>
<v3cned$291hd$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net 8sCtXWa8hvwurA25tC88BwVz85qLLqNYIb9Pz5DVrW/K8hpvI=
Cancel-Lock: sha1:DzOnH+gPRjQnSh6fpnMRJgIlX/Q= sha1:ARXsdwfiPV1cE7LHaBpF/FBYZ6E= sha256:WAHA8p5WwhhTs4lbPLnvV4Z8ngtYGp3zg2kQPWYkqX4=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
View all headers

Muttley@dastardlyhq.com writes:
> On Fri, 31 May 2024 15:23:35 +0100
> Rainer Weikusat <rweikusat@talktalk.net> wrote:
>>Muttley@dastardlyhq.com writes:
>>> Rainer Weikusat <rweikusat@talktalk.net> wrote:
>>>>Muttley@dastardlyhq.com writes:
>>>>> Rainer Weikusat <rweikusat@talktalk.net> wrote:
>>>>>>scott@slp53.sl.home (Scott Lurndal) writes:
>>>>>>> Nicolas George <nicolas$george@salle-s.org> writes:
>>>>>>>>Muttley@dastardlyhq.com, dans le message <v36kd8$11r1b$1@dont-email.me>,
>>>>>>>> a écrit :
>>>>>>>>> The simple answer being that no process uses /tmp unless it needs to
>>>>share
>>>>>>>>> data with another via files.
>>>>>>>>
>>>>>>>>So where should they put their temporary files?
>>>>>>>
>>>>>>> $ mkdir ${TMPDIR}/${LOGNAME} && chown 1700 ${TMPDIR}/${LOGNAME}
>>>>>>>
>>>>>>> Note that /tmp and /var/tmp usually have the "Sticky" mode bit
>>>>>>> set which limits the operations that a non-owner can
>>>>>>> perform on a file in that directory.
>>>>>>
>>>>>>This solves only half of the problem: mkdir will fail if the given
>>>>>>filesystem name already exists. Some scheme to create unguessable names
>>>>>>and try using them until success would still be needed on top of that.
>>>>>
>>>>> Process id + time and date down to the microsecond in the filename usually
>>
>>>>> solves that problem. If multi threaded then throw in the thread id too.
>>>>> Creating unique filenames isn't a problem so long as everyone sticks to the
>>
>>>>> scheme.
>>>>
>>>>BASE64-encoding a random number would also work. But I didn't claim this
>>>>would be particularly complicated, just that it needed to be done.
>>>
>>> Always the danger of a collision if both programs seeded the sequence with
>>> the same value, albeit very small.
>>
>>Regardless of the scheme that's employed, there's always a danger of
>>collisions, ie, of some other processing having created a file with this
>>name first.
>
> After a program has exited it has no claim to any temporary files so thats
> a non issue.

It's an issue because a program may intentionally create files (or
symlinks) with names another program will likely try to use for a
temporary file in the near future. The same may happen for less
nefarious reasons because "shit happened", which it's wont to do.

In the general case, programs creating files in world-writable
directories need to handle the situation that another program might try
to use the same filename at the same time.

Subject: Re: security by kees-cookity [rant]
From: Richard Kettlewell
Newsgroups: comp.unix.programmer
Organization: terraraq NNTP server
Date: Sat, 1 Jun 2024 08:26 UTC
References: 1 2 3 4 5 6 7 8 9 10 11
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!news.gegeweb.eu!gegeweb.org!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail
From: invalid@invalid.invalid (Richard Kettlewell)
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Sat, 01 Jun 2024 09:26:47 +0100
Organization: terraraq NNTP server
Message-ID: <wwv1q5h6pbs.fsf@LkoBDZeT.terraraq.uk>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com>
<20240523182552.895@kylheku.com>
<87pltb2pju.fsf@doppelsaurus.mobileactivedefense.com>
<wwvzfse59dd.fsf@LkoBDZeT.terraraq.uk>
<87h6ekhlte.fsf@doppelsaurus.mobileactivedefense.com>
<wwvfru3y8dp.fsf@LkoBDZeT.terraraq.uk>
<20240528075707.00004bcf@gmail.com>
<wwv1q5ljbv9.fsf@LkoBDZeT.terraraq.uk>
<20240529074426.00000142@gmail.com>
<wwvo78o3807.fsf@LkoBDZeT.terraraq.uk>
<20240529130503.00007214@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6";
logging-data="11713"; mail-complaints-to="usenet@innmantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:OIO3i6OMvotT3pLQTmuugBZbSDk=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^
F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha
+r0NzP?vnz:e/knOY)PI-
X-Boydie: NO
View all headers

John Ames <commodorejohn@gmail.com> writes:
> Richard Kettlewell <invalid@invalid.invalid> wrote:
>> John Ames <commodorejohn@gmail.com> writes:
>>> Minimal-assistance-in-the-absence-of-direct-supervision is a *very*
>>> different thing from intelligent-override-of-deliberate-action.
>>
>> I think some automated braking for goalposts is needed here.
>
> Let me come back at my point, then: security precautions predicated on
> the assumption that an Authorized Person is not operating in good faith
> and due diligence concordant with their level of authorization suffer
> from severe diminishing returns with each additional layer of safeguard
> and may even reach a point where they're *counterproductive.*

They might. But, also, any assumption that people are always going to
(1) know how to correctly use the system in front of them and (2) get
all the details right every time, is going to be violated from time to
time.

I think it’s worth introducing systematic mitigations for those risks,
if that can be done without undue impact.

> Restricting the ability to install software to a designated group of
> administrators, f'rexample, is a perfectly sensible thing to do,
> especially in a large shared system.

Agreed.

> But once you've created such a group, assessing whether a given
> individual is trustworthy and knowledgeable enough to be a member of
> it is an organizational problem, *not* a technical one.

Agreed that the assessment is an organizational problem. But I’d hope
you’d agree that:

1) Even the best-run organization will get it wrong from time to time.
2) Not every organiation is particularly well run.
3) Trustworthy, knowledgeable individuals still make mistakes.

> Some measure of safeguarding may still be worth the bother despite this
> (while Windows's "hey, you got this thing off the Interwebs, you sure
> 'sokay?" prompts annoy me personally, I can see the logic behind them,)
> but every additional layer calls further into question what the point
> of even having the group is in the first place, and whether *anyone*
> should really be a member of it. If not, why did you let them in? If
> so, why are you hampering their ability to exercise that authority?
>
> This has become semi-famously an issue in medical software, for
> instance. Developers of some major EMR systems, driven by regulatory
> and legal CYA concerns, have put so many are-you-sure and please-
> acknowledge-XYZ prompts into their core workflow that doctors (who are,
> shockingly, only human) end up clicking through them machine-gun style,
> and pay *less* attention to the actually critical stuff than they
> would've if it weren't buried in an avalanche of white noise.

Agreed that excessive are-you-sure prompts have a high risk of training
their users to blindly click through.

But in the case of protected_regular there’s nothing to click through
and for the most part no-one ever notices any difference unless under
attack[1], so I don’t think that the are-you-sure prompts are a good
comparator.

[1] and in the few niche cases where someone does, they can think about
the tradeoffs and either disable it or work around it.

> And doctors aren't software specialists; sysadmins *are.* Throw too
> many safeguards in the path of a sysadmin just trying to get shit done,
> and you don't end up with a sysadmin forced to question whether they
> really *are* sure, or even a sysadmin powering doctor-style through a
> set of nagging little obstacles they aren't thinking about; you end up
> with a sysadmin who will - guaranteed - develop a process of *disabling
> the entire safeguard system* for the duration of the job, and then (if
> you're lucky) re-enabling it afterward.
>
> We saw exactly that with UAC in Windows Vista; it was so bad that the #1
> method for dealing with it was to disable it entirely, and people were
> so burned by it that that remained true *well* into the Win10 era,
> despite MS's attempts to temper it into some measure of reasonability.
>
> So no, I don't think that a couple examples of minimal assistance in
> situations where direct supervision is either absent or impaired *do*
> constitute a hard-and-fast argument against temperance in security
> design as a general principle. Sometimes a little extra safety is worth
> it, sometimes not; and sometimes you're actually shooting yourself in
> the foot.

I think collision assist is really good model for protected_regular.

The potential collision might be due to the driver’s occasional
inattention (analogy: sysadmin writes scripts most days, but mis-handles
filename spoofing risks occasionally) or it might be someone else’s
error (analogy: insecure download+install script).

The collision assist doesn’t prevent normal driving, it only activates
when things are about to go seriously wrong[2]; for almost everybody the
same is true of protected_regular, it only blocks anything when an
attack is underway.

[2] It may impede crash testing, but presumably if you’re doing that
you’re a manufacturer or evaluator and have the tools to disable it.

--
https://www.greenend.org.uk/rjk/

Subject: Re: security by kees-cookity [rant]
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.programmer
Organization: A noiseless patient Spider
Date: Sat, 1 Jun 2024 08:36 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Muttley@dastardlyhq.com
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Sat, 1 Jun 2024 08:36:06 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <v3emhm$2mmsl$1@dont-email.me>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com>
<wwvfru3y8dp.fsf@LkoBDZeT.terraraq.uk>
<20240528075707.00004bcf@gmail.com>
<20240528103438.00005f0b@gmail.com>
<87v82xpsxr.fsf@doppelsaurus.mobileactivedefense.com>
<v36kd8$11r1b$1@dont-email.me> <66574c1c$0$8220$426a74cc@news.free.fr>
<0oI5O.7253$gkW.1029@fx40.iad>
<878qzs5yq3.fsf@doppelsaurus.mobileactivedefense.com>
<v37ojn$1821q$1@dont-email.me>
<874jag5ozc.fsf@doppelsaurus.mobileactivedefense.com>
<v3bu3h$24ou0$1@dont-email.me>
<87v82uoyag.fsf@doppelsaurus.mobileactivedefense.com>
<v3cned$291hd$1@dont-email.me>
<87r0dhptnr.fsf@doppelsaurus.mobileactivedefense.com>
Injection-Date: Sat, 01 Jun 2024 10:36:06 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="80ae5ec4893693e117b76188dd2823fd";
logging-data="2841493"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Jj+VPlAFQixnq8ScNMLGS"
Cancel-Lock: sha1:mf7UHABi0fglrc6UwP91nV5ZNC4=
View all headers

On Fri, 31 May 2024 22:18:16 +0100
Rainer Weikusat <rweikusat@talktalk.net> wrote:
>Muttley@dastardlyhq.com writes:
>> After a program has exited it has no claim to any temporary files so thats
>> a non issue.
>
>It's an issue because a program may intentionally create files (or
>symlinks) with names another program will likely try to use for a
>temporary file in the near future. The same may happen for less
>nefarious reasons because "shit happened", which it's wont to do.

Why would a program try to use some random shit in a file instead of deleting
the file first or simply opening it with "w" in fopen() or O_TRUNC ?

>In the general case, programs creating files in world-writable
>directories need to handle the situation that another program might try
>to use the same filename at the same time.

Which is why you give your file a unique name. However there is no 100%
fullproof solution to this issue so if you're worried about it don't write
to a world writable directory.

Subject: Re: security by kees-cookity [rant]
From: Rainer Weikusat
Newsgroups: comp.unix.programmer
Date: Sat, 1 Jun 2024 14:42 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: rweikusat@talktalk.net (Rainer Weikusat)
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Sat, 01 Jun 2024 15:42:52 +0100
Lines: 23
Message-ID: <87wmn8hggj.fsf@doppelsaurus.mobileactivedefense.com>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com>
<20240523182552.895@kylheku.com>
<87pltb2pju.fsf@doppelsaurus.mobileactivedefense.com>
<wwvzfse59dd.fsf@LkoBDZeT.terraraq.uk>
<87h6ekhlte.fsf@doppelsaurus.mobileactivedefense.com>
<wwvfru3y8dp.fsf@LkoBDZeT.terraraq.uk>
<20240528075707.00004bcf@gmail.com>
<wwv1q5ljbv9.fsf@LkoBDZeT.terraraq.uk>
<20240529074426.00000142@gmail.com>
<wwvo78o3807.fsf@LkoBDZeT.terraraq.uk>
<20240529130503.00007214@gmail.com>
<wwv1q5h6pbs.fsf@LkoBDZeT.terraraq.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net 6Mdl6xgPf5TqUXBa3nBKzApdaKl0NXSIdC/vMBHKuxgR4EL/k=
Cancel-Lock: sha1:90w+cdcjoxlCj0PfSLWbjxZ//zA= sha1:WO7AvrOZr5ha7xVIq5fbPNkt8lI= sha256:/PtwR+oGSsasB9KRSDNbDlXT8bWLTNd6IWU8eISq20I=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
View all headers

Richard Kettlewell <invalid@invalid.invalid> writes:

[...]

> I think collision assist is really good model for protected_regular.
>
> The potential collision might be due to the driver’s occasional
> inattention (analogy: sysadmin writes scripts most days, but mis-handles
> filename spoofing risks occasionally) or it might be someone else’s
> error (analogy: insecure download+install script).
>
> The collision assist doesn’t prevent normal driving, it only activates
> when things are about to go seriously wrong[2]; for almost everybody the
> same is true of protected_regular, it only blocks anything when an
> attack is underway.

protected_regular does prevent "normal driving" and it decidedly
'activates' in situations where nothing untoward is underway. I've
described an example of that.

In absence of a specific example (I've asked for but didn't receive a
reply), I also don't think that 'protection' against random stuff Google
employees can dream up is a great asset.

Subject: Re: security by kees-cookity [rant]
From: Richard Kettlewell
Newsgroups: comp.unix.programmer
Organization: terraraq NNTP server
Date: Sat, 1 Jun 2024 17:50 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!news.gegeweb.eu!gegeweb.org!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail
From: invalid@invalid.invalid (Richard Kettlewell)
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Sat, 01 Jun 2024 18:50:58 +0100
Organization: terraraq NNTP server
Message-ID: <wwv4jacblh9.fsf@LkoBDZeT.terraraq.uk>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com>
<20240523182552.895@kylheku.com>
<87pltb2pju.fsf@doppelsaurus.mobileactivedefense.com>
<wwvzfse59dd.fsf@LkoBDZeT.terraraq.uk>
<87h6ekhlte.fsf@doppelsaurus.mobileactivedefense.com>
<wwvfru3y8dp.fsf@LkoBDZeT.terraraq.uk>
<20240528075707.00004bcf@gmail.com>
<wwv1q5ljbv9.fsf@LkoBDZeT.terraraq.uk>
<20240529074426.00000142@gmail.com>
<wwvo78o3807.fsf@LkoBDZeT.terraraq.uk>
<20240529130503.00007214@gmail.com>
<wwv1q5h6pbs.fsf@LkoBDZeT.terraraq.uk>
<87wmn8hggj.fsf@doppelsaurus.mobileactivedefense.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6";
logging-data="19482"; mail-complaints-to="usenet@innmantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:1ygZkDyGSheruLfh8jGR+juE7TQ=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^
F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha
+r0NzP?vnz:e/knOY)PI-
X-Boydie: NO
View all headers

Rainer Weikusat <rweikusat@talktalk.net> writes:
> Richard Kettlewell <invalid@invalid.invalid> writes:
>> I think collision assist is really good model for protected_regular.
>>
>> The potential collision might be due to the driver’s occasional
>> inattention (analogy: sysadmin writes scripts most days, but mis-handles
>> filename spoofing risks occasionally) or it might be someone else’s
>> error (analogy: insecure download+install script).
>>
>> The collision assist doesn’t prevent normal driving, it only activates
>> when things are about to go seriously wrong[2]; for almost everybody the
>> same is true of protected_regular, it only blocks anything when an
>> attack is underway.
>
> protected_regular does prevent "normal driving" and it decidedly
> 'activates' in situations where nothing untoward is underway. I've
> described an example of that.

You’re not in the “almost everybody”.

--
https://www.greenend.org.uk/rjk/

Subject: Re: security by kees-cookity [rant]
From: Rainer Weikusat
Newsgroups: comp.unix.programmer
Date: Sun, 2 Jun 2024 19:22 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: rweikusat@talktalk.net (Rainer Weikusat)
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Sun, 02 Jun 2024 20:22:55 +0100
Lines: 25
Message-ID: <87zfs3b14g.fsf@doppelsaurus.mobileactivedefense.com>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com>
<20240523182552.895@kylheku.com>
<87pltb2pju.fsf@doppelsaurus.mobileactivedefense.com>
<wwvzfse59dd.fsf@LkoBDZeT.terraraq.uk>
<87h6ekhlte.fsf@doppelsaurus.mobileactivedefense.com>
<wwvfru3y8dp.fsf@LkoBDZeT.terraraq.uk>
<20240528075707.00004bcf@gmail.com>
<wwv1q5ljbv9.fsf@LkoBDZeT.terraraq.uk>
<20240529074426.00000142@gmail.com>
<wwvo78o3807.fsf@LkoBDZeT.terraraq.uk>
<20240529130503.00007214@gmail.com>
<wwv1q5h6pbs.fsf@LkoBDZeT.terraraq.uk>
<87wmn8hggj.fsf@doppelsaurus.mobileactivedefense.com>
<wwv4jacblh9.fsf@LkoBDZeT.terraraq.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net Y4LDf45bBY/kzmD1fIcuvA5+YhQTqZZzBu+F7+rMuNiW/ghw4=
Cancel-Lock: sha1:HTMbJUSgygN7duyjiEG2fHigEe4= sha1:5rg5a1/U6Q7XAVPkJOuPpbf3gBc= sha256:EbCWWjKqtzH+jPMcJMLLIwNaeciotudzAqOTx500tA0=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
View all headers

Richard Kettlewell <invalid@invalid.invalid> writes:
> Rainer Weikusat <rweikusat@talktalk.net> writes:
>> Richard Kettlewell <invalid@invalid.invalid> writes:
>>> I think collision assist is really good model for protected_regular.
>>>
>>> The potential collision might be due to the driver’s occasional
>>> inattention (analogy: sysadmin writes scripts most days, but mis-handles
>>> filename spoofing risks occasionally) or it might be someone else’s
>>> error (analogy: insecure download+install script).
>>>
>>> The collision assist doesn’t prevent normal driving, it only activates
>>> when things are about to go seriously wrong[2]; for almost everybody the
>>> same is true of protected_regular, it only blocks anything when an
>>> attack is underway.
>>
>> protected_regular does prevent "normal driving" and it decidedly
>> 'activates' in situations where nothing untoward is underway. I've
>> described an example of that.
>
> You’re not in the “almost everybody”.

There's nothing special about the technical situation I described. It's
reallyv completely everyday "best pratice" stuff: Run stuff as
unprivileged user where possible, use standard file system features to
limit access rights to anything to the necessary minimum.

Subject: Re: security by kees-cookity [rant]
From: Rainer Weikusat
Newsgroups: comp.unix.programmer
Date: Sun, 2 Jun 2024 19:27 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: rweikusat@talktalk.net (Rainer Weikusat)
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Sun, 02 Jun 2024 20:27:53 +0100
Lines: 20
Message-ID: <87v82rb0w6.fsf@doppelsaurus.mobileactivedefense.com>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com>
<wwvfru3y8dp.fsf@LkoBDZeT.terraraq.uk>
<20240528075707.00004bcf@gmail.com>
<20240528103438.00005f0b@gmail.com>
<87v82xpsxr.fsf@doppelsaurus.mobileactivedefense.com>
<v36kd8$11r1b$1@dont-email.me> <66574c1c$0$8220$426a74cc@news.free.fr>
<0oI5O.7253$gkW.1029@fx40.iad>
<878qzs5yq3.fsf@doppelsaurus.mobileactivedefense.com>
<v37ojn$1821q$1@dont-email.me>
<874jag5ozc.fsf@doppelsaurus.mobileactivedefense.com>
<v3bu3h$24ou0$1@dont-email.me>
<87v82uoyag.fsf@doppelsaurus.mobileactivedefense.com>
<v3cned$291hd$1@dont-email.me>
<87r0dhptnr.fsf@doppelsaurus.mobileactivedefense.com>
<v3emhm$2mmsl$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net +3zd1I71ofEp034xtqX7zwfpiEG44NjQEXcnBZue4FDm3+E5E=
Cancel-Lock: sha1:GucapNcky2MyoUXrxx/kN8xDbNE= sha1:FNBwEzr1I3muAN0HwWB0sByf+kk= sha256:sRk0E4UZ+oKbxrYC5zBfuDSdyeIIO3SEExgI88jP2BE=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
View all headers

Muttley@dastardlyhq.com writes:
> On Fri, 31 May 2024 22:18:16 +0100
> Rainer Weikusat <rweikusat@talktalk.net> wrote:
>>Muttley@dastardlyhq.com writes:

[...]

>>In the general case, programs creating files in world-writable
>>directories need to handle the situation that another program might try
>>to use the same filename at the same time.
>
> Which is why you give your file a unique name. However there is no 100%
> fullproof solution to this issue so if you're worried about it don't write
> to a world writable directory.

There is no way to give files names which are guaranteed to be unique
unless the set of all program ever running on a given system and they
they're going to use the file system is known. And that's still just for
the ordinary case, ie, without hostile third parties trying to 'exploit'
something.

Subject: Re: security by kees-cookity [rant]
From: John Ames
Newsgroups: comp.unix.programmer
Organization: A noiseless patient Spider
Date: Mon, 3 Jun 2024 15:17 UTC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: commodorejohn@gmail.com (John Ames)
Newsgroups: comp.unix.programmer
Subject: Re: security by kees-cookity [rant]
Date: Mon, 3 Jun 2024 08:17:13 -0700
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <20240603081713.00007583@gmail.com>
References: <87pltc5kdl.fsf@doppelsaurus.mobileactivedefense.com>
<20240523182552.895@kylheku.com>
<87pltb2pju.fsf@doppelsaurus.mobileactivedefense.com>
<wwvzfse59dd.fsf@LkoBDZeT.terraraq.uk>
<87h6ekhlte.fsf@doppelsaurus.mobileactivedefense.com>
<wwvfru3y8dp.fsf@LkoBDZeT.terraraq.uk>
<20240528075707.00004bcf@gmail.com>
<wwv1q5ljbv9.fsf@LkoBDZeT.terraraq.uk>
<20240529074426.00000142@gmail.com>
<wwvo78o3807.fsf@LkoBDZeT.terraraq.uk>
<20240529130503.00007214@gmail.com>
<wwv1q5h6pbs.fsf@LkoBDZeT.terraraq.uk>
<87wmn8hggj.fsf@doppelsaurus.mobileactivedefense.com>
<wwv4jacblh9.fsf@LkoBDZeT.terraraq.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Date: Mon, 03 Jun 2024 17:17:16 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="ac543627a9a1bc765eb5e8f98a7a39af";
logging-data="4049893"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX195gkxrQApCo2u1+OkqfyA2ASPzhdQIwCM="
Cancel-Lock: sha1:/mXy1Nb0SwqDTWQ+O3KJ7tRPlBo=
X-Newsreader: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-w64-mingw32)
View all headers

On Sat, 01 Jun 2024 18:50:58 +0100
Richard Kettlewell <invalid@invalid.invalid> wrote:

> You’re not in the “almost everybody”.

He's also no true Scotsman.

Pages:12

rocksolid light 0.9.8
clearnet tor