Commit Graph

6004 Commits

Author SHA1 Message Date
Jo-Philipp Wich 13075d4d51 cgi-io: add download operation
Add a new `cgi-download` applet which allows to retrieve the contents
of regular files or block devices.

In order to initiate a transfer, a POST request in x-www-form-urlencoded
format must be sent to the applet, with one field "sessionid" holding
the login session and another field "path" containing the file path to
download.

Further optional fields are "filename" which - if present - will cause
the download applet to set a Content-Dispostition header and "mimetype"
which allows to let the applet respond with a specific type instead of
the default "application/octet-stream".

Below is an example for the required acl rules to grant download access
to files or block devices:

    ubus call session grant '{
        "ubus_rpc_session": "...",
        "scope": "cgi-io",
        "objects": [
            [ "download", "read" ]
        ]
    }'

    ubus call session grant '{
        "ubus_rpc_session": "...",
        "scope": "file",
        "objects": [
            [ "/etc/config/*", "read" ],
            [ "/dev/mtdblock*", "read" ]
        ]
    }'

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ab2a2b080d)
2019-10-11 14:33:23 +02:00
Jo-Philipp Wich 0fc83858fc cgi-io: use different acl scopes for path and command permissions
Use the `cgi-io` scope to check for permission to execute the requested
command (`upload`, `backup`) and the `file` scope to check path
permissions.

The reasoning of this change is that `cgi-io` is usually used in
conjunction with `rpcd-mod-file` to transfer large file data out
of band and `rpcd-mod-file` already uses the `file` scope to manage
file path access permissions. After this change, both `rpc-mod-file`
and `cgi-io` can share the same path acl rules.

Write access to a path can be granted by using an ubus call in the
following form:

    ubus call session grant '{
        "ubus_rpc_session": "...",
        "scope": "file",
        "objects": [
            [ "/var/lib/uploads/*", "write" ]
        ]
    }'

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c8a86c8c8e)
2019-10-11 14:31:49 +02:00
Jo-Philipp Wich 76d741c990 cgi-io: require whitelisting upload locations
Introduce further ACL checks to verify that the request-supplied
upload location may be written to. This prevents overwriting things
like /bin/busybox and allows to confine uploads to specific directories.

To setup the required ACLs, the following ubus command may be used
on the command line:

ubus call session grant '{
  "ubus_rpc_session": "d41d8cd98f00b204e9800998ecf8427e",
  "scope": "cgi-io",
  "objects": [
    [ "/etc/certificates/*", "write" ],
    [ "/var/uploads/*", "write" ]
  ]
}'

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 22be9a1c01)
2019-10-11 14:04:11 +02:00
Dirk Brenken 5c54504498 banip: update 0.3.1
* the WAN auto detection now supports multiple interfaces, too
* no longer filter out possible LAN devices
* add a new DoH (DNS over HTTPS) blocklist source with public
  DoH DNS server addresses, to effectively block client side DoH
  communication, e.g. via Firefox or Chrome

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit 70ab67649b)
2019-10-09 19:40:04 +02:00
Dirk Brenken bfdbf137ea banip: update 0.3.0
* new 'ca-bundle' dependency as all https connections
  are now validated by default
* automatically select the download utility: 'aria2', 'curl',
  'uclient-fetch' with libustream-* or wget are supported
* track & ban failed LuCI login attempts as well
* add a small log/banIP background monitor to block
  SSH/LuCI brute force attacks in realtime (disabled by default)
* add a config version check (please update your default config!)
* made the automatic wan detection more stable
* fix the IPv6 logfile parser
* fix the service status message
* update readme

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit ff8b853a6d)
2019-10-09 19:39:19 +02:00
Karl Palsson 6b8870a353 net/mosquitto: drop obsolete libuuid dependency
libuuid was dropped as a dependency in mosquitto 1.6.0

Signed-off-by: Karl Palsson <karlp@etactica.com>
2019-10-09 13:50:14 +00:00
Hannu Nyman 7af62d891a Merge pull request #10165 from stangri/19.07-simple-adblock
[19.07] simple-adblock: bugfix: proper dnsmasq reload on stop, rework start/stop logic
2019-10-07 18:09:35 +03:00
Josef Schlehofer 9fd74cbb02 unbound: Update to version 1.9.4
Fixes CVE-2019-16866

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry-picked from commit 1caf170daf)
2019-10-07 01:12:20 +02:00
Stan Grishin aac235151b simple-adblock: bugfix: proper dnsmasq reload on stop, rework start/stop logic
Signed-off-by: Stan Grishin <stangri@melmac.net>
2019-10-06 09:34:03 -07:00
Christian Lachner 62e42b4720 haproxy: Update HAProxy to v2.0.7
- Update haproxy download URL and hash
- Add new patches (see https://www.haproxy.org/bugs/bugs-2.0.7.html)

Signed-off-by: Christian Lachner <gladiac@gmail.com>
2019-10-05 14:05:19 +02:00
Stan Grishin fe2114d785 simple-adblock: bugfix and improvements (check description)
Signed-off-by: Stan Grishin <stangri@melmac.net>
2019-10-03 18:42:14 -07:00
William Fleurant d0fff76c2e yggdrasil: bump to 0.3.9
Signed-off-by: William Fleurant <meshnet@protonmail.com>
(cherry-picked from 7296ff1b5c)
2019-09-29 19:04:31 -07:00
Josef Schlehofer e59ac33808 dnscrypt-proxy2: Update to version 2.0.27
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry-picked from commit b9fbb90fd4)
2019-09-29 20:42:31 +02:00
Claudius Ellsel 05ad389f41 adblock: More cosmetic changes and more detailed installation instructions to README.md
Signed-off-by: Claudius Ellsel <claudius.ellsel@live.de>
(cherry picked from commit 6121af755d)
2019-09-29 08:01:02 +02:00
Claudius Ellsel df4452ade3 adblock: Cosmetic changes to README.md
Add code blocks for easier reading and change "dns" to "DNS".

Signed-off-by: Claudius Ellsel <claudius.ellsel@live.de>
(cherry picked from commit 088a14e5ce)
2019-09-29 07:59:37 +02:00
Johannes Rothe bbc6a303a1 travelmate: add support for optional args in auto-login script
This can be helpful for example in hotels where you need to
enter a new user/password combination every week.

Signed-off-by: Johannes Rothe <mail@johannes-rothe.de>
(cherry picked from commit a7f87f939d)
2019-09-29 07:58:00 +02:00
Jan Pavlinec a0d4cc9170 treewide: add PKG_CPE_ID for cvescanner
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
(cherry-picked from ceadbcbb64)
2019-09-26 19:36:27 -07:00
Jan Pavlinec 937b19ebb7 treewide: add PKG_CPE_ID for better cvescanner coverage
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
(cherry-picked from bf2f1a0263)
2019-09-26 19:36:27 -07:00
Jan Pavlinec fac472e28a samba4: update to version 4.9.13 (security fix)
Fixes CVE-2019-10197

Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
(cherry-picked from ad16f2a851)
2019-09-26 19:36:26 -07:00
Oever González 8671765883 samba4: remove double quotes for renice
The double quote thells the shell that the list returned from `pidof` is a
single argument, therefore, `renice` will cry about a malformed input.
With this commit, `renice` will be applied correctly to all the returned PIDs
from `pidof`.

The output of `renice` for the quoted list is as follows:
`renice: invalid number '6592 6587 6586 6574'`
`renice` does not show and does apply the nice value if the list is unquoted.

Signed-off-by: Oever González <notengobattery@gmail.com>
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
(cherry-picked from c45974d0a3)
2019-09-26 19:36:26 -07:00
Andy Walsh cd597524d1 samba4: add python2 host dependency
* add python2/host dependency

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
(cherry-picked from c02ef3ae7f)
2019-09-26 19:36:26 -07:00
Rosen Penev d3db014eb1 samba4: Run init script through shellcheck
Some performance improvements by batching file writes.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry-picked from d03b88b5b0)
2019-09-26 19:36:26 -07:00
Andy Walsh 8a20820a9b samba4: revert to 4.9.11
* revert to 4.9.x series (4.10 needs too many unofficial patches and has weird waf bugs)
* cleanup patches
* enable AD_DC build option again

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
(cherry-picked from 2f2a4bccd9)
2019-09-26 19:36:25 -07:00
Sven Eckelmann 1142f52078 treewide: Change .*GPL.*+ licenses to SPDX compatible identifier
The CONTRIBUTING.md requests an (or multiple) SPDX identifier for GPL
licenses. But a lot of packages did use a different, non-SPDX style with a
"+" at the end instead of "-or-later".

Signed-off-by: Sven Eckelmann <sven@narfation.org>
(cherry-picked from bbb1ea7345)
2019-09-26 19:36:25 -07:00
Florian Eckert 605383751e keepalived: update version to 2.0.18
Update version to 2.0.18

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry-picked from 333324f973)
2019-09-26 19:36:24 -07:00
Florian Eckert 05f4ae9250 keepalived: fix shellcheck warnings
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry-picked from 7a207f87af)
2019-09-26 19:36:24 -07:00
Nikos Mavrogiannopoulos 4b3ddb1382 ocserv: updated to 0.12.4
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
(cherry-picked from cefb2f03e2)
2019-09-26 19:36:24 -07:00
Florian Eckert 6154afb3cf stunnel: fix some shellcheck warnings
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry-picked from 6713d1d771)
2019-09-26 19:36:24 -07:00
Florian Eckert 1a93b5512f stunnel: update version to 5.55
Update version to 5.55

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry-picked from a17e90591c)
2019-09-26 19:36:23 -07:00
Rosen Penev e02387b95e geth: Update to 1.9.1
Remove Upstreamed patch.

Minor cleanups.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry-picked from 03b1d7c4d4)
2019-09-26 19:36:23 -07:00
Andreas Nilsen 1e48632e08 hcxtools: Update to v5.2.2
Signed-off-by: Andreas Nilsen <adde88@gmail.com>
2019-09-26 19:47:29 +02:00
Andreas Nilsen 80002c1b99 hcxdumptool: Update to v5.2.2
Signed-off-by: Andreas Nilsen <adde88@gmail.com>
2019-09-26 19:47:08 +02:00
Karl Palsson 1f1444ed2c net/mosquitto: bump to 1.6.7
Fixes compatibility with newer libwebsockets versions.
Fixes performance issues with websockets
Fixes potential crash on config reload
Fixes CVEs: CVE-2019-11778 and CVE-2019-11779
Various MQTTv5 fixes.
Skips releases with critical regressions

Changelog for 1.6.7:
https://mosquitto.org/blog/2019/09/version-1-6-7-released/

Changelog for 1.6.5:
https://mosquitto.org/blog/2019/09/version-1-6-5-released/

Changelog for 1.6.6:
https://mosquitto.org/blog/2019/09/version-1-6-6-released/

Signed-off-by: Karl Palsson <karlp@etactica.com>
2019-09-25 16:13:23 +00:00
Hannu Nyman 83e7e3af8d Merge pull request #10064 from stangri/19.07-simple-adblock
[19.07] simple-adblock: dnsmasq.ipset option support, better handling of IDNs, updated README
2019-09-25 19:13:00 +03:00
Christian Lachner aacc401495 haproxy: Update HAProxy to v2.0.6
- Update haproxy download URL and hash
- Add new patches

Signed-off-by: Christian Lachner <gladiac@gmail.com>
2019-09-25 11:53:08 +02:00
Jan Pavlinec 6bab28e8d7 usbip: disable ASLR PIE
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
(cherry-picked from commit ff216608a0)
2019-09-24 21:58:31 +02:00
Stan Grishin 17a58fa39d simple-adblock: dnsmasq.ipset option support, better handling of IDNs, updated README
Signed-off-by: Stan Grishin <stangri@melmac.net>
2019-09-24 09:12:08 -07:00
Rosen Penev fd31ee0a93 atftp: Update to 0.7.2
Fixes issue where CFLAGS were not being passed. This was breaking ASLR
builds.

Added PKG_BUILD_PARALLEL for faster compilation.

Added PKG_INSTALL. Changed install paths based on PKG_INSTALL paths.

Added --disable-debug to make sure debug code is disabled.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry-picked from 946dfed856)
2019-09-23 11:57:51 -07:00
Dirk Brenken 2c7118e1d7 adblock: update 3.8.6
* refine stop logic to prevent needless dns backend restarts
  and other oddities
* cosmetics

Signed-off-by: Dirk Brenken <dev@brenken.org>
2019-09-17 13:59:08 +02:00
Rosen Penev 3875601317 Merge pull request #10000 from cshoredaniel/pr-19.07-p910nd-non-root-backport
[19.07] p910nd: Run as non-root by default
2019-09-15 07:16:27 -07:00
Daniel F. Dickinson 0e78a105c8 uwsgi-cgi: use python3 hostpkg not system python3
On a Debian system without python3-distutils install, uwsgi-cgi was
failing to build because it couldn't import sysconfig from distutils.
OpenWrt packages should be using the OpenWrt python not the system
python. In addition we need to use python3 not python2, even when
both are available.

(cherry-pick c387d0923c from master)

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2019-09-14 16:46:05 -04:00
Daniel F. Dickinson 875eb10d11 p910nd: Run as non-root by default
We add the necessary Makefile, hotplug, config, and init bits
so that p910nd daemon runs as user:group p910nd:lp by default.
This eliminates an unnecessary root daemon.

The hotplug script sets the permissions of the USB lp
device(s) to read-write owner and group and no access to
anyone else, and sets owner root, group lp.

This is allows sufficient privileges to p910nd
to do it's job.

(cherry-pick 932c76fa74)

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2019-09-14 16:44:08 -04:00
Dirk Brenken 3f89abbf0d banip: update 0.2.1
* remove 'http-only' mode, all sources are now fetched from https sites
* the backup mode is now mandatory ('/tmp' is the default backup
  directory), always create and re-use backups if available.
  To force a re-download take the 'reload' action.
* support 'sshd' in addition to 'dropbear' for logfile parsing
  to detect break-in events
* always update the black-/whitelist with logfile parsing results
  in 'refresh' mode (no new downloads)
* rework the return code handling
* tweak procd trigger
* various small fixes
* (s)hellsheck cosmetics
* Change .*GPL.*+ licenses to SPDX compatible identifier

Signed-off-by: Dirk Brenken <dev@brenken.org>
2019-09-11 06:21:20 +02:00
Dirk Brenken 1ad19c6bfa adblock: update 3.8.5
* use raw procd interface trigger as last resort, if the
  adblock config is not available during startup
* fix selective subdomain whitelisting for dnsmasq
* fix a kresd restart issue with 'DNS File Reset'
* fix a suspend/resume cornercase
* disable the tld compression, if the number of blocked domains
  is greater than 'adb_maxtld' (default: 100000)
* made the fw portlist configurable (default '53 853 5353')
* preliminary support for inotify-like autoload features
  of dns backends like kresd in future Turris OS. If 'adb_dnsinotify'
  is set to 'true', all adblock related restarts and the
  'DNS File Reset' will be disabled

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit 45cb0e1023)
2019-09-09 14:57:14 +02:00
Josef Schlehofer 20bd9b78e1 lighttpd: Makefile polishing
- Correct SPDX License Identifier
- Move MAINTAINER, SUBMENU to more appropriate place
- Use HTTPS in URL

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry-picked from commit e06086c4c)
2019-09-07 13:31:02 +02:00
Josef Schlehofer 19039dc4ae lighttpd: Update to version 1.4.54
Fixes CVE-2019-11072

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry-picked from commit 80c721c6a)
2019-09-07 13:30:44 +02:00
Jan Hák 52a2936597 knot: update to 2.8.3
Added lmdb dependency

Signed-off-by: Jan Hák <jan.hak@nic.cz>
(cherry-picked from 0b19979301)
2019-09-06 16:37:07 -07:00
Jan Hák abb9ac3e9c knot: upgrade to vetsion 2.8.2
Upgrade of Knot DNS package to version 2.8.2

Signed-off-by: Jan Hák <jan.hak@nic.cz>
(cherry-picked from 30627a9928)
2019-09-06 16:36:45 -07:00
Matthias Schiffer 421b922fde fastd: fix init script for multiple VPN instances
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
(cherry picked from commit b7ff8b8087)
2019-09-04 22:50:12 +02:00
Eric Luehrsen b69c271d0a unbound: update to 1.9.3
Signed-off-by: Eric Luehrsen <ericluehrsen@gmail.com>
(cherry-picked from commit c36d8a49fd)
2019-09-01 18:24:05 +02:00