Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd: unit hardening #78

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

erdnaxe
Copy link

@erdnaxe erdnaxe commented Jan 6, 2022

This increases the isolation of TheLounge service.

This patch does not set SystemCallFilter option as it might break old Debian-based distributions due to a different naming convention for predefined call sets.

AF_NETLINK must be allowed in RestrictAddressFamilies, else the service will crash on startup with the following error:

os.js:68
      throw new ERR_SYSTEM_ERROR(ctx);
      ^
SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_interface_addresses returned Unknown system error 97 (Unknown system error 97)
    at Object.networkInterfaces (os.js:259:16)
    at getIfaceInfo (/xxxxx/thelounge/node_modules/cacheable-lookup/source/index.js:41:40)
    at new CacheableLookup (/xxxxx/thelounge/node_modules/cacheable-lookup/source/index.js:93:1
    at Object.<anonymous> (/xxxxx/thelounge/node_modules/got/dist/source/core/index.js:29:24)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:93:18) {
  code: 'ERR_SYSTEM_ERROR',
  info: {
    errno: 97,
    code: 'Unknown system error 97',
    message: 'Unknown system error 97',
    syscall: 'uv_interface_addresses'
  },
  errno: [Getter/Setter],
  syscall: [Getter/Setter]
}

Copy link
Member

@brunnre8 brunnre8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work, however there's some things which should be discussed.

systemd/system.service Outdated Show resolved Hide resolved
systemd/system.service Outdated Show resolved Hide resolved
systemd/system.service Outdated Show resolved Hide resolved
This increases the isolation of TheLounge service.

This patch does not set `SystemCallFilter` option as it might break old
Debian-based distributions due to a different naming convention for predefined
call sets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants