Commit Graph

6288 Commits (185833836cb6c4822058a0cfe64f7487bfe16a30)
 

Author SHA1 Message Date
M_ars 4dbae26b9b GUI: advanced-wireless.asp - adjust/improve saving country/rev selection
Note: saving country/rev selection was not working for all FT user (at least one report for mips branch)
3 years ago
pedro 3a1ba208f8 kernel sdk7: drivers: net: pptp: updates from the upstream; clean-up
pptp: pptp_rcv_core() misses pskb_may_pull() call
4ea2739ea8

pptp: fix skb leak in pptp_xmit()
8bae8bd6cb

net: constify some ppp/pptp structs
756e64a0b1

pptp: fix sparse pointer warning
469230d118

pptp: lookup route with the proper net namespace
08252b3231

pptp: fix sparse pointer warning
469230d118

pptp: fix stack info leak in pptp_getname()
a5f6fc28d6

pptp: fix illegal memory access caused by multiple bind()s
9a368aff9c
3 years ago
pedro 97f86757c4 kernel sdk6: drivers: net: pptp: updates from the upstream; clean-up
pptp: pptp_rcv_core() misses pskb_may_pull() call
4ea2739ea8

pptp: fix skb leak in pptp_xmit()
8bae8bd6cb

net: constify some ppp/pptp structs
756e64a0b1

pptp: fix sparse pointer warning
469230d118

pptp: lookup route with the proper net namespace
08252b3231

pptp: fix sparse pointer warning
469230d118

pptp: fix stack info leak in pptp_getname()
a5f6fc28d6

pptp: fix illegal memory access caused by multiple bind()s
9a368aff9c
3 years ago
pedro bd79cb2c7a GUI: Web Server: cosmetic 3 years ago
pedro f2b0e55e5d GUI: USB and NAS: FTP/Samba/FTPD/BT: add daemon status, add re-start button (unify to nginx/mysql page)
- for BiTorrent Client unify button to open TR GUI
- for Media Server add button to open status page
3 years ago
pedro b964c49698 kernel sdk6: drivers: char: n_tty: updates from the upstream
tty: fix "IRQ45: nobody cared"
7b292b4bf9

TTY: n_tty, do not dereference user buffer
3fa10cc83f

tty: Fix possible race in n_tty_read()
00aaae033e
3 years ago
pedro 551454f909 kernel sdk7: drivers: char: n_tty: updates from the upstream
tty: fix "IRQ45: nobody cared"
7b292b4bf9

TTY: n_tty, do not dereference user buffer
3fa10cc83f

tty: Fix possible race in n_tty_read()
00aaae033e
3 years ago
pedro ffddc71911 kernel sdk7: drivers: char: n_tty: fix n_tty_write crash when echoing in raw mode (sync to sdk6, which already has this fix - ported)
The tty atomic_write_lock does not provide an exclusion guarantee for
the tty driver if the termios settings are LECHO & !OPOST.  And since
it is unexpected and not allowed to call TTY buffer helpers like
tty_insert_flip_string concurrently, this may lead to crashes when
concurrect writers call pty_write. In that case the following two
writers:
* the ECHOing from a workqueue and
* pty_write from the process
race and can overflow the corresponding TTY buffer like follows.

If we look into tty_insert_flip_string_fixed_flag, there is:
  int space = __tty_buffer_request_room(port, goal, flags);
  struct tty_buffer *tb = port->buf.tail;
  ...
  memcpy(char_buf_ptr(tb, tb->used), chars, space);
  ...
  tb->used += space;

so the race of the two can result in something like this:
              A                                B
__tty_buffer_request_room
                                  __tty_buffer_request_room
memcpy(buf(tb->used), ...)
tb->used += space;
                                  memcpy(buf(tb->used), ...) ->BOOM

B's memcpy is past the tty_buffer due to the previous A's tb->used
increment.

Since the N_TTY line discipline input processing can output
concurrently with a tty write, obtain the N_TTY ldisc output_lock to
serialize echo output with normal tty writes.  This ensures the tty
buffer helper tty_insert_flip_string is not called concurrently and
everything is fine.

Note that this is nicely reproducible by an ordinary user using
forkpty and some setup around that (raw termios + ECHO). And it is
present in kernels at least after commit
d945cb9 (pty: Rework the pty layer to
use the normal buffering logic) in 2.6.31-rc3.

js: add more info to the commit log
js: switch to bool
js: lock unconditionally
js: lock only the tty->ops->write call

References: CVE-2014-0196
Reported-and-tested-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Ref: 4291086b1f
3 years ago
pedro d7853dede7 kernel sdk7: net: netfilter: updates from the upstream (sync to sdk6, which already has these fixes)
netfilter: xt_CLASSIFY: add ARP support, allow CLASSIFY target on any table
9811600f7c

netfilter: xt_connbytes: handle negation correctly
0354b48f63

netfilter: xt_conntrack: fix inverted conntrack direction test
96120d86fe

netfilter: xtables: xt_cpu: add missing aliases for autoloading via iptables
f1e231a356

netfilter: IPv6: fix DSCP mangle code
1ed2f73d90

netfilter: xt_hl: Reduce switch/case indent
181b1e9ce1

netfilter: xt_iprange: typo in IPv4 match debug print code
705ca14717

netfilter: xt_iprange: Incorrect xt_iprange boundary check for IPv6
08b5194b5d

netfilter: xt_limit: have r->cost != 0 case work
82e6bfe2fb

netfilter: xt_rateest: fix xt_rateest_mt_checkentry()
00fe1ae91e
3 years ago
pedro 1d7ddcc944 dropbear: patches: add DEFAULT_ROOT_PATH 3 years ago
pedro b9e2085caa dropbear: fix MAX_UNAUTH_CLIENTS regression - fix from the upstream (added as a patch)
Since re-exec change in 2022.82 Dropbear count
treat authenticated sessions towards the unauthenticated
session limit. This is fixed by passing the childpipe FD
through to the re-execed process.

Ref: 544f28a051
3 years ago
pedro 4a722f8cbd kernel sdk7: updates from the upstream (sync to sdk6, which already has these fixes)
nfsd: remove /proc/fs/nfs when create /proc/fs/nfs/exports error
ff7c4b3693

proc: disable mem_write after exec
26947f8c8f

fs/fscache/stats.c: fix memory leak
ec686c9239

fix cdev leak on O_PATH final fput()
60ed8cf78f

params: Fix potential memory leak in add_sysfs_param()
63662139e5

get_net_ns_by_fd() oopses if proc_ns_fget() returns an error
c316e6a308
3 years ago
pedro 8f598eb111 kernel sdk6: net: slip: updates from the upstream
slip: remove unnecessary break after goto
8904120b52

slip: Check if rstate is initialized before uncompressing
3f01ddb962

slip: make slhc_free() silently accept an error pointer
baf76f0c58

slip: make slhc_compress() more robust against malicious packets
110a40dfb7
3 years ago
pedro 5e2f51169e kernel sdk7: net: slip: updates from the upstream
slip: remove unnecessary break after goto
8904120b52

slip: Check if rstate is initialized before uncompressing
3f01ddb962

slip: make slhc_free() silently accept an error pointer
baf76f0c58

slip: make slhc_compress() more robust against malicious packets
110a40dfb7
3 years ago
pedro 43cf590b2d kernel sdk6: net: veth: updates from the upstream
net/veth: Fix packet checksumming
0b7967503d

veth: Fix the byte counters
675071a2ef

Revert: veth: remove unneeded ifname code from veth_newlink()
6c8c44462a

veth: convert to 64 bit statistics
6311cc44a2

veth: fix 64bit stats on 32bit arches
cf05c700cf

veth: Allow to create peer link with given ifindex
e6f8f1a739
3 years ago
pedro 62b0d38019 kernel sdk7: net: veth: updates from the upstream
net/veth: Fix packet checksumming
0b7967503d

veth: Fix the byte counters
675071a2ef

Revert: veth: remove unneeded ifname code from veth_newlink()
6c8c44462a

veth: convert to 64 bit statistics
6311cc44a2

veth: fix 64bit stats on 32bit arches
cf05c700cf

veth: Allow to create peer link with given ifindex
e6f8f1a739
3 years ago
pedro 12299c4646 kernel sdk6: drivers: net: ppp: move PFC decompression to PPP generic layer
Extract "Protocol" field decompression code from transport protocols to
PPP generic layer, where it actually belongs. As a consequence, this
patch fixes incorrect place of PFC decompression in L2TP driver (when
it's not PPPOX_BOUND) and also enables this decompression for other
protocols, like PPPoE.

Protocol field decompression also happens in PPP Multilink Protocol
code and in PPP compression protocols implementations (bsd, deflate,
mppe). It looks like there is no easy way to get rid of that, so it was
decided to leave it as is, but provide those cases with appropriate
comments instead.

Changes in v2:
  - Fix the order of checking skb data room and proto decompression
  - Remove "inline" keyword from ppp_decompress_proto()
  - Don't split line before function name
  - Prefix ppp_decompress_proto() function with "__"
  - Add ppp_decompress_proto() function with skb data room checks
  - Add description for introduced functions
  - Fix comments (as per review on mailing list)

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>

Ref: 7fb1b8ca8f
3 years ago
pedro 71894039c4 kernel sdk7: drivers: net: ppp: move PFC decompression to PPP generic layer
Extract "Protocol" field decompression code from transport protocols to
PPP generic layer, where it actually belongs. As a consequence, this
patch fixes incorrect place of PFC decompression in L2TP driver (when
it's not PPPOX_BOUND) and also enables this decompression for other
protocols, like PPPoE.

Protocol field decompression also happens in PPP Multilink Protocol
code and in PPP compression protocols implementations (bsd, deflate,
mppe). It looks like there is no easy way to get rid of that, so it was
decided to leave it as is, but provide those cases with appropriate
comments instead.

Changes in v2:
  - Fix the order of checking skb data room and proto decompression
  - Remove "inline" keyword from ppp_decompress_proto()
  - Don't split line before function name
  - Prefix ppp_decompress_proto() function with "__"
  - Add ppp_decompress_proto() function with skb data room checks
  - Add description for introduced functions
  - Fix comments (as per review on mailing list)

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>

Ref: 7fb1b8ca8f
3 years ago
pedro e5ad8e8281 kernel sdk6: net: l2tp: updates from the upstream
l2tp: Fix PPP header erasure and memory leak
55b92b7a11

l2tp: Correctly return -EBADF from pppol2tp_getname
4ac36a4ada

l2tp: Fix the connect status check in pppol2tp_getname
56cff471d0
3 years ago
pedro a3a4a61bf2 kernel sdk7: net: l2tp: updates from the upstream
l2tp: Fix PPP header erasure and memory leak
55b92b7a11

l2tp: Correctly return -EBADF from pppol2tp_getname
4ac36a4ada

l2tp: Fix the connect status check in pppol2tp_getname
56cff471d0
3 years ago
pedro 9fcac880a6 kernel sdk6: drivers: net: ppp_deflate: updates from the upstream
ppp: deflate: never return len larger than output buffer
e2a4800e75

ppp: deflate: Fix possible crash in deflate_init
3ebe1bca58

ppp: deflate: Remove useless call "zlib_inflateEnd"
dc5fa2073f
3 years ago
pedro d00a59bf05 kernel sdk7: drivers: net: ppp_deflate: updates from the upstream
ppp: deflate: never return len larger than output buffer
e2a4800e75

ppp: deflate: Fix possible crash in deflate_init
3ebe1bca58

ppp: deflate: Remove useless call "zlib_inflateEnd"
dc5fa2073f
3 years ago
pedro 0a4ccbfdc8 kernel sdk7: drivers: net: ppp_mppe: updates from the upstream
ppp: mppe: sanity error path rework
325301892a

ppp: mppe: discard late packet in stateless mode
0365476314

ppp: mppe: Use vsnprintf extension %phN
4f5a98410d
3 years ago
pedro ba6c45129e kernel sdk7: drivers: net: ppp_mppe: updates from the upstream
ppp: mppe: sanity error path rework
325301892a

ppp: mppe: discard late packet in stateless mode
0365476314

ppp: mppe: Use vsnprintf extension %phN
4f5a98410d
3 years ago
pedro 2758f2d33e kernel sdk6: drivers: net: ppp_synctty: updates from the upstream
ppp: avoid false drop_monitor false positives (forgottrn only for ppp_synctty.c)
968d70184d

tty: Fix recursive deadlock in tty_perform_flush()
e7f3880cd9

ppp: reuse print_hex_dump_bytes
167bfa7184
3 years ago
pedro 929f064d88 kernel sdk7: drivers: net: ppp_synctty: updates from the upstream
ppp: avoid false drop_monitor false positives (forgottrn only for ppp_synctty.c)
968d70184d

tty: Fix recursive deadlock in tty_perform_flush()
e7f3880cd9

ppp: reuse print_hex_dump_bytes
167bfa7184
3 years ago
pedro d1c01fe1bc kernel sdk6: drivers: net: use vzalloc()
Use vzalloc() and vzalloc_node() in net drivers

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Ref: 89bf67f1f0
3 years ago
pedro b36b3b9f15 kernel sdk7: drivers: net: use vzalloc()
Use vzalloc() and vzalloc_node() in net drivers

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Ref: 89bf67f1f0
3 years ago
pedro 6c38f3e3be Revert "kernel sdk6: drivers: tty: make tiocgicount a handler"
This reverts commit 680f7cb515.

Problem with tuxera driver
3 years ago
pedro 047ca07772 Revert "kernel sdk6: drivers: usb: convert the USB drivers to the new icount interface"
This reverts commit 6da581e134.

Problem with tuxera driver
3 years ago
pedro 3077cbf80b Revert "kernel sdk7: drivers: tty: make tiocgicount a handler"
This reverts commit f0ef2a2bfa.

Problems with tuxera driver
3 years ago
pedro 21b170cea1 Revert "kernel sdk7: drivers: usb: convert the USB drivers to the new icount interface"
This reverts commit a5aafcaa3e.

Problems with tuxera driver
3 years ago
pedro 65394506aa kernel sdk7: drivers: net: pppoe: revert 4 latest commits because of possible problems with CTF
- revert (from newest):

pppoe: fix memory corruption in padt work structure
fe53985aaa

ppp: remove PPPOX_ZOMBIE socket state
a8acce6aa5

ppp: don't set sk_state to PPPOX_ZOMBIE in pppoe_disc_rcv()
8734e485fe

pppoe: Use workqueue to die properly when a PADT is received
287f3a943f
3 years ago
pedro d7d071eaa8 kernel sdk6: drivers: net: pppoe: revert 4 latest commits because of possible problems with CTF
- revert (from newest):

pppoe: fix memory corruption in padt work structure
fe53985aaa

ppp: remove PPPOX_ZOMBIE socket state
a8acce6aa5

ppp: don't set sk_state to PPPOX_ZOMBIE in pppoe_disc_rcv()
8734e485fe

pppoe: Use workqueue to die properly when a PADT is received
287f3a943f
3 years ago
pedro 920fef78aa kernel sdk7: drivers: net: pppoe: updates from the upstream
pppoe: remove unused return value from two methods
3b12bb6043

ppp: slight optimization of addr compare
7ed8ca5b1e

net: pppoe: use correct channel MTU when using Multilink PPP
a8a3e41c67

pppoe: Use workqueue to die properly when a PADT is received
287f3a943f

pppoe: Lacks DST MAC address check
a068833bbf

pppoe: drop pppoe device in pppoe_unbind_sock_work
665a6cd809

ppp: don't override sk->sk_state in pppoe_flush_dev()
e6740165b8

ppp: fix pppoe_dev deletion condition in pppoe_release()
1acea4f6ce

ppp: don't set sk_state to PPPOX_ZOMBIE in pppoe_disc_rcv()
8734e485fe

ppp: remove PPPOX_ZOMBIE socket state
a8acce6aa5

pppoe: fix memory corruption in padt work structure
fe53985aaa

pppoe: only process PADT targeted at local interfaces
b8c1583951
3 years ago
pedro 3c2dd8cbb7 kernel sdk6: drivers: net: pppoe: updates from the upstream
pppoe: remove unused return value from two methods
3b12bb6043

ppp: slight optimization of addr compare
7ed8ca5b1e

net: pppoe: use correct channel MTU when using Multilink PPP
a8a3e41c67

pppoe: Use workqueue to die properly when a PADT is received
287f3a943f

pppoe: Lacks DST MAC address check
a068833bbf

pppoe: drop pppoe device in pppoe_unbind_sock_work
665a6cd809

ppp: don't override sk->sk_state in pppoe_flush_dev()
e6740165b8

ppp: fix pppoe_dev deletion condition in pppoe_release()
1acea4f6ce

ppp: don't set sk_state to PPPOX_ZOMBIE in pppoe_disc_rcv()
8734e485fe

ppp: remove PPPOX_ZOMBIE socket state
a8acce6aa5

pppoe: fix memory corruption in padt work structure
fe53985aaa

pppoe: only process PADT targeted at local interfaces
b8c1583951
3 years ago
M_ars 481d828649 build: clean-up & adjust targets
Note: build all Asus SDK6 router images (incl. DSL-AC68U) in one go (no change)
3 years ago
pedro 6988d3d912 kernel sdk6: drivers: net: ppp_generic: updates from the upstream
ppp: fix truesize underestimation
19c6c8f58b

ppp: fix 'ppp_mp_reconstruct bad seq' errors
8a49ad6e89

ppp: Don't stop and restart queue on every TX packet
e675f0cc9a

ppp: Fix race condition with queue start/stop
9a5d2bd99e

ppp: avoid false drop_monitor false positives
968d70184d

net: ppp: reset nextseq counter when enabling SC_MULTILINK
d762d03849

net: ppp: access ppp->nextseq only if CONFIG_PPP_MULTILINK is defined
a9f559c37b

fix misuses of f_count() in ppp and netlink
24dff96a37

ppp: fix lockdep splat in ppp_dev_uninit()
58a89ecaca

ppp, slip: Validate VJ compression slot parameters completely
4ab42d78e3

ppp: clarify parsing of user supplied data in ppp_set_compress()
555d5b70f1

ppp: lock ppp->flags in ppp_read() and ppp_poll()
edffc2178d

ppp: release rtnl mutex when interface creation fails
6faac63a69

ppp: ensure file->private_data can't be overridden
e8e56ffd9d

ppp: take reference on channels netns
1f461dcdd2
3 years ago
pedro 1d16e7fa0a kernel sdk7: drivers: net: ppp_generic: updates from the upstream
ppp: fix truesize underestimation
19c6c8f58b

ppp: fix 'ppp_mp_reconstruct bad seq' errors
8a49ad6e89

ppp: Don't stop and restart queue on every TX packet
e675f0cc9a

ppp: Fix race condition with queue start/stop
9a5d2bd99e

ppp: avoid false drop_monitor false positives
968d70184d

net: ppp: reset nextseq counter when enabling SC_MULTILINK
d762d03849

net: ppp: access ppp->nextseq only if CONFIG_PPP_MULTILINK is defined
a9f559c37b

fix misuses of f_count() in ppp and netlink
24dff96a37

ppp: fix lockdep splat in ppp_dev_uninit()
58a89ecaca

ppp, slip: Validate VJ compression slot parameters completely
4ab42d78e3

ppp: clarify parsing of user supplied data in ppp_set_compress()
555d5b70f1

ppp: lock ppp->flags in ppp_read() and ppp_poll()
edffc2178d

ppp: release rtnl mutex when interface creation fails
6faac63a69

ppp: ensure file->private_data can't be overridden
e8e56ffd9d

ppp: take reference on channels netns
1f461dcdd2
3 years ago
pedro 13eec71c92 kernel sdk7: drivers: mtd: phram: fix memory leak
- cosmetic only (sync to sdk6), this module is not compiled

Ref: f17f12ce9d
3 years ago
M_ars d51c43661f SDK7: check wireless driver max client tuneable value
Note: keep max clients default to 32 for SDK7 but check driver for tuneable value
3 years ago
pedro 94f9845f8b Merge branch 'arm-master' into arm-sdk7 3 years ago
M_ars 25872d57d9 Sync to SDK7 (SDK7: check wireless driver max client tuneable value) 3 years ago
M_ars 1cbf194e14 GUI: advanced-wireless.asp - Set bss_maxassoc same as global max clients 3 years ago
M_ars 5163badd60 router: httpd: wl.c - adjust and correct scan params for wireless survey (GUI: tools-survey) 3 years ago
pedro 5bcfedc63c kernel sdk6: drivers: usb: usbnet: revert commit 861981f 3 years ago
pedro 88b9626834 kernel sdk7: drivers: usb: usbnet: revert commit 8f7211b 3 years ago
pedro 21dff1363e Merge branch 'arm-master' into arm-sdk7 3 years ago
pedro 53bd7e57cf build: sync to MIPS (fix TCONFIG_MICROSD option) 3 years ago
pedro 19049fba7f GUI: Tools: Wireless Survey: add a note for ARM routers, that WL survey doesn't work when WL filter is turned on in 'permit only' mode (workaround for #224) 3 years ago