fuse_get_context()->pid == 0

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

fuse_get_context()->pid == 0

Leandro Franco
Hi,

I have a FS where i check the pid in every operation and there is a
point () in the read where the context gives me a pid=0 (uid and gid=0
also) i dont really know the cause but i base the security on the
pid's and this gives me very funny results

i dont modify the context and i'm not storing it so i was wondering if
this was related with fuse directly....

ideas are always welcome :)

Thanks
Leandro


READ[146901152] 65536 bytes from 0
uid: 502 gid: 502 pid: 19273
   READ[146901152] 65536 bytes
   unique: 35, error: 0 (Success), outsize: 65552
unique: 36, opcode: READ (15), nodeid: 2, insize: 64
READ[146901152] 65536 bytes from 65536                      
<------------------------
uid: 0 gid: 0 pid: 0                                                  
          <------------------------
   unique: 36, error: -13 (Permission denied), outsize: 16  
<------------------------
unique: 37, opcode: READ (15), nodeid: 2, insize: 64        
<------------------------
READ[146901152] 4096 bytes from 65536
uid: 502 gid: 502 pid: 19273
   READ[146901152] 4096 bytes
   unique: 37, error: 0 (Success), outsize: 4112
unique: 38, opcode: READ (15), nodeid: 2, insize: 64
READ[146901152] 4096 bytes from 69632
uid: 502 gid: 502 pid: 19273
   READ[146901152] 4096 bytes
   unique: 38, error: 0 (Success), outsize: 4112
unique: 39, opcode: READ (15), nodeid: 2, insize: 64


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: fuse_get_context()->pid == 0

Miklos Szeredi
> I have a FS where i check the pid in every operation and there is a
> point () in the read where the context gives me a pid=0 (uid and gid=0
> also) i dont really know the cause but i base the security on the
> pid's and this gives me very funny results

OK, can you tell, when exactly does this happen?  Is it reproducible,
or does it happen totally randomly?

> i dont modify the context and i'm not storing it so i was wondering if
> this was related with fuse directly....

Maybe.  The uid/gid/pid memebers seem to be always filled in by the
kernel, so I don't really know where this could come from.

Miklos


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: fuse_get_context()->pid == 0

jens m. noedler
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Miklos Szeredi worte:

>> i dont modify the context and i'm not storing it so i was
>> wondering if this was related with fuse directly....
>
> Maybe.  The uid/gid/pid memebers seem to be always filled in by the
> kernel, so I don't really know where this could come from.

Some time ago I had the problem that my uid always was 0 even when
mounting a fuse fs as user. The problem was caused by a kernel compiled
with gcc Debian 1:3.3.5-8 and the fuse module with gcc Debian 1:3.3.5-12.

Recompiling kernel and fuse with exactly the same version was the
solution. Maybe you should try this.

Bye, Jens

- --
jens m. noedler
  [hidden email]
  pgp: 0x9f0920bb
  http://noedler.de

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC/GGDBoFc9p8JILsRAntKAJ9MjvquwW/vtFolfskiBa6qca6K0gCeO2D1
8P1ZeDCZtJTi5FEcAEfnmrQ=
=KVbW
-----END PGP SIGNATURE-----


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: fuse_get_context()->pid == 0

Miklos Szeredi
> >> i dont modify the context and i'm not storing it so i was
> >> wondering if this was related with fuse directly....
> >
> > Maybe.  The uid/gid/pid memebers seem to be always filled in by the
> > kernel, so I don't really know where this could come from.
>
> Some time ago I had the problem that my uid always was 0 even when
> mounting a fuse fs as user. The problem was caused by a kernel compiled
> with gcc Debian 1:3.3.5-8 and the fuse module with gcc Debian 1:3.3.5-12.
>
> Recompiling kernel and fuse with exactly the same version was the
> solution. Maybe you should try this.

Yeah.  We seem to be in the middle of some incompatible gcc changes
that cause all sorts of trouble.

If FUSE was to be included into mainline Linux, this sort of problem
would go away.  Since the release of 2.6.13 is coming very near, and
after that there will be a very short window (about 2 weeks) to merge
everything going into 2.6.14, I'd like to ask anybody, who would like
to see this done, to please write a polite mail to Andrew Morton
<[hidden email]>, and ask him to merge FUSE.  There's still a lot of
skepticism about the usefulness of FUSE in the kernel developers'
minds, and that is not something I can change alone.

Thanks,
Miklos


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel