From: "ibrahim via 9fans" <9fans@9fans.net>
To: 9fans <9fans@9fans.net>
Subject: [9fans] serious bug in ramfs and code based on it
Date: Wed, 3 May 2023 22:32:57 -0400 [thread overview]
Message-ID: <16831675770.A5cCC4.81650@composer.9fans.topicbox.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]
The classic implementation of ramfs and many other user fileservers based on it have a serious bug regarding the 9p protocol :
If you open a file for which you have Read/Execute Permission you are free to write to that file by sending Twrite requests.
*
*
*rwrite doesn't check if the file was opened for read, write or execute. *
A possible solution for this problem is enhancing the meaning of Fid.open from an indicator for open files to an indicator for open files and the mode they were opened :
0x80 ... file is open
0x40 ... opened for reading
0x20 ... opened for writing
0x10 ... opened for execution
While ramfs is regared as a toy program with minimal permission checking many user file servers around are based on this example like all the tools in tapefs.
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T08f89c41317a2e69-M990b45a03a13257b66e4e8bc
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
[-- Attachment #2: Type: text/html, Size: 1732 bytes --]
reply other threads:[~2023-05-04 2:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16831675770.A5cCC4.81650@composer.9fans.topicbox.com \
--to=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).