Re: NFS mount fail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/5/2023 7:03 AM, Paul Moore wrote:
> On Thu, May 4, 2023 at 9:00 PM Casey Schaufler <casey@xxxxxxxxxxxxxxxx> wrote:
>> On 5/4/2023 9:11 AM, Roberto Sassu wrote:
>>> Hi Casey
>>>
>>> while developing the fix for overlayfs, I tried first to address the
>>> issue of a NFS filesystem failing to mount.
>>>
>>> The NFS server does not like the packets sent by the client:
>>>
>>> 14:52:20.827208 IP (tos 0x0, ttl 64, id 60628, offset 0, flags [DF], proto TCP (6), length 72, options (unknown 134,EOL))
>>>     localhost.localdomain.omginitialrefs > _gateway.nfs: Flags [S], cksum 0x7618 (incorrect -> 0xa18c), seq 455337903, win 64240, options [mss 1460,sackOK,TS val 2178524519 ecr 0,nop,wscale 7], length 0
>>> 14:52:20.827376 IP (tos 0xc0, ttl 64, id 5906, offset 0, flags [none], proto ICMP (1), length 112, options (unknown 134,EOL))
>>>     _gateway > localhost.localdomain: ICMP parameter problem - octet 22, length 80
>>>
>>> I looked at the possible causes. SELinux works properly.
>> SELinux was the reference LSM implementation for labeled networking.
>>
>>> What it seems to happen is that there is a default netlabel mapping,
>>> that is used to send the packets out.
>> Correct. SELinux only uses CIPSO options for MLS.
> SELinux can use the NetLabel/CIPSO "local" configuration to send a
> full SELinux labels over a loopback connection.

True enough. As you point out below, that's an advanced configuration
option. A typical SELinux system isn't going to be set up that way.

> * https://www.paul-moore.com/blog/d/2012/06/cipso_loopback_full_labels.html
>
> There are several differences between how SELinux and Smack implement
> labeled networking, one of the larger differences is that SELinux
> leaves the labeling configuration, e.g. which networks/interfaces are
> labeled and how, as a separate exercise for the admin whereas the
> labeling configuration is much more integrated with Smack.

Which is consistent with the general approach of the two systems.

> I wouldn't say one approach is better than the other, they are simply
> different.  

Agreed, for the most part.

> The SELinux approach provides for the greatest amount of
> flexibility with the understanding that more work needs to be done by
> the admin. The Smack approach provides a quicker path to getting a
> system up and running, but it is less flexible for challenging/mixed
> network environments.

Smack does have knobs and levers for setting some network attributes,
and netlabelctl can be useful in certain cases. Smack could take better
advantage of the netlabel capabilities than it does.

> There are other issues around handling IPv6,

Smack CALIPSO support (to replace the existing IPv6 handling) is on
the short list. When that gets done depends on many factors.

>  the sockets-as-objects
> debate, etc. but those shouldn't be relevant to this discussion.

Agreed.




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux