disabling uds interface by default in libfuse builds
Hi Tofik,
there is a report from David about UDS and while checking, there are actually more issues. Reason is that libfuse does not verify requests, but trusts the kernel. With UDS that is not guaranteed and reads beyond buffer size is easily possible.
Any objections to https://github.com/libfuse/libfuse/pull/1602?
Thanks,
Bernd
A message that is not in the archive (sent off-list or not yet received): CY5PR11MB618643B25E49C18F0B6C3B1082A82@CY5PR11MB6186.namprd11.prod.outlook.com
Hi Tofik,
[please find my reply inline as custom on kernel lists]
Quoted 4 lines · Tofik
Hi Bernd,
I see, thanks for letting me know, and good to have this spotted.
Quoted 11 lines
Perhaps adding the build option makes the most sense, but why do we need to guard the addition of the custom I/O API if we have added the documentation that
describes the requirements for its proper utilization and implementation? Is it
to highlight this issue for existing users of this API so they get a compilation
error when they upgrade libfuse? Would it be an option for us to add the desired
validation in thestream_read()implementation example to make it more correct?
isn't the problem that <uds-client> provides the socket and an <application/fuse-server (libfuse)> reads the socket. So if <uds-client> does something wrong, <fuse-server> does out of bound reads, i.e. the part that is not guilty. For <default-client/kernel> we just expect that it works perfectly, but with a userspace client that guarantee is not given. To get it perfectly safe fuse-server needs to add a lot of sanity checks and I'm not even sure if that will work, because <uds-client> can spoof all kind of data in the headers.
I'm fully open for discussion how to handle it. At the moment I don't have a good idea how to get it perfectly safe, so my reaction is <disable it by default>.
Thanks,
Bernd