Commit Graph

410 Commits

Author SHA1 Message Date
wowario 952b0492d9 initial commit 2021-08-29 23:56:47 +03:00
moneromooo-monero 8eb2b79bad
p2p: remove blocked addresses/hosts from peerlist 2021-08-05 19:05:02 +00:00
SChernykh 9ca9f1214a Fixed issues found by static analysis
- rolling_median: tried to free uninitialized pointer in a constructor
- net_node.inl: erase-remove idiom was used incorrectly. remove_if doesn't actually remove elements, see http://cpp.sh/6fcjv
- bulletproofs.cc: call to sizeof() instead of vector.size(), luckily it only impacts performance and not code logic there
2021-03-18 21:57:13 +01:00
moneromooo-monero b5667c9f6c
p2p: allow CIDR notation in DNS blocklist 2021-01-21 01:41:31 +00:00
moneromooo-monero fe6dda9453
p2p: only log to global when a blocked IP is not already blocked 2021-01-08 15:50:10 +00:00
Lee Clagett ba3c627c57 Command max_bytes moved from dynamic map to static switch 2020-12-23 23:53:27 +00:00
luigi1111 7ecdc53e11
Merge pull request #7248
3c7eec1 add a max levin packet size by command type (moneromooo-monero)
2021-01-06 21:08:11 -05:00
moneromooo-monero 3c7eec152c
add a max levin packet size by command type 2021-01-03 14:07:58 +00:00
Alexander Blair db686707cb
Merge pull request #7239
e685f52e2 p2p: fix deadlock banning while updating peer lists (moneromooo)
2021-01-01 22:42:17 -08:00
moneromooo e685f52e25
p2p: fix deadlock banning while updating peer lists 2020-12-31 03:15:11 +00:00
Lee Clagett 7d67a2dde0 Add aggressive restrictions to pre-handshake p2p buffer limit 2020-12-29 19:58:53 -05:00
Alexander Blair 0873f3193a
Merge pull request #7181
e35bbb1e8 ban lists may now include subnets (moneromooo-monero)
2020-12-26 13:59:51 -08:00
Alexander Blair e08d37fc7b
Merge pull request #7146
3bb748ad9 p2p: remove peers from grey and anchors lists when blocked (moneromooo-monero)
2020-12-26 13:57:54 -08:00
Alexander Blair 1c14b7b3b2
Merge pull request #7139
fb9ef2426 Optional DNS based blocklist (moneromooo-monero)
2020-12-26 13:57:25 -08:00
moneromooo-monero e35bbb1e88
ban lists may now include subnets 2020-12-22 02:12:58 +00:00
moneromooo-monero fb9ef24267
Optional DNS based blocklist
If enabled, pulls IPs to block on blocklist.moneropulse.*, and
blocks then for 8 days (so IPs dropping from the list will
eventually get unblocked, and DNS failures don't result in
instant clearing of the blocklist).

Enable with --enable-dns-blocklist
2020-12-20 02:34:24 +00:00
moneromooo-monero 3bb748ad94
p2p: remove peers from grey and anchors lists when blocked 2020-12-13 23:27:56 +00:00
moneromooo-monero a569483c19
p2p: ignore incoming peer list entries when we have them blocked 2020-12-13 23:14:22 +00:00
luigi1111 f7aa91f70d
Merge pull request #7076
37bb594 Do not use peer_id tracking method over i2p/tor (Lee Clagett)
2020-12-07 10:26:15 -06:00
luigi1111 f9a70e4260
Merge pull request #7073
446b3c8 p2p: drop peers that spam peer lists (moneromooo-monero)
2020-12-07 10:25:38 -06:00
luigi1111 f105a0ef38
Merge pull request #7071
21b3ff2 p2p: fix race condition accessing a deleted context (moneromooo-monero)
2020-12-07 10:23:57 -06:00
moneromooo-monero 21b3ff2c90
p2p: fix race condition accessing a deleted context 2020-12-06 12:42:11 +00:00
moneromooo-monero 446b3c865b
p2p: drop peers that spam peer lists
There's always some people who just want to abuse things
2020-12-05 13:41:48 +00:00
moneromooo 9427b5a6d5
keep only the last seen node on a given host in the white list 2020-12-04 01:55:05 +00:00
Howard Chu 398e64ccbe
Better log message for unusable anon networks 2020-11-16 12:37:40 +00:00
Lee Clagett 6f48a146f8 Fix i2p/tor seed nodes 2020-11-07 00:37:49 -05:00
luigi1111 1a3bef15b9
Merge pull request #6993
44c93bb p2p: fix accessing non existent element of map (moneromooo-monero)
2020-11-06 18:53:22 -06:00
moneromooo-monero 44c93bb47a
p2p: fix accessing non existent element of map 2020-11-07 00:17:47 +00:00
moneromooo-monero 4985afddb3
p2p: add a tor seed 2020-11-06 23:21:10 +00:00
luigi1111 4191dc8981
Merge pull request #6990
263579b Add support for i2p and tor seed nodes (vtnerd)
2020-11-06 17:15:11 -06:00
luigi1111 32581fb223
Merge pull request #6985
91f1be9 net_node: add tor / i2p seed nodes (selsta)
2020-11-06 17:12:42 -06:00
selsta 91f1be9ea2
net_node: add tor / i2p seed nodes 2020-11-05 21:41:11 +01:00
moneromooo-monero 35186b1b84
p2p: fix endianness when checking IPv6 addresses mapping to IPv4 2020-11-05 16:05:54 +00:00
moneromooo-monero b36c4f354b
p2p: make this work with boost <= 1.65 (pffff) 2020-11-04 23:01:47 +00:00
moneromooo 92d19c48da
p2p: rewrite boost's make_address_v4 to cater for < 1.66 2020-11-04 20:26:50 +00:00
luigi1111 4603ec9765
Merge pull request #6962
1a627e1 p2p: use /16 filtering on IPv4-within-IPv6 addresses (moneromooo-monero)
2020-11-04 10:36:23 -06:00
luigi1111 0be71bcea9
Merge pull request #6961
f55f3fe net_node: add --ban-list option (selsta)
2020-11-04 10:35:07 -06:00
moneromooo-monero 1a627e1f89
p2p: use /16 filtering on IPv4-within-IPv6 addresses
IPv6 addresses include a range that can map IPv4 addresses,
which allowed those mapped addresses to bypass filtering.

This filter should be replaced by AS filtering at some point.
2020-11-03 17:36:25 +00:00
luigi1111 9f68111b69
Merge pull request #6964
5090cdc p2p: remove banned peers from the white list (moneromooo-monero)
2020-11-03 11:22:27 -06:00
moneromooo 5090cdc9f5
p2p: remove banned peers from the white list 2020-11-02 19:03:12 +00:00
moneromooo df1061c87d
p2p: give all hosts the same chance of being picked for connecting
even if some run more than one node
2020-11-02 19:01:43 +00:00
selsta f55f3fe81c net_node: add --ban-list option 2020-11-02 17:26:02 +01:00
xiphon 6352090e6d Dandelion++: skip desynced peers in stem phase 2020-10-12 16:39:40 +00:00
Lee Clagett 37bb59485f Do not use peer_id tracking method over i2p/tor 2020-10-11 13:19:25 +00:00
Lee Clagett 263579b217 Add support for i2p and tor seed nodes 2020-10-09 14:07:40 +00:00
moneromooo-monero 7175dcb107
replace most boost serialization with existing monero serialization
This reduces the attack surface for data that can come from
malicious sources (exported output and key images, multisig
transactions...) since the monero serialization is already
exposed to the outside, and the boost lib we were using had
a few known crashers.

For interoperability, a new load-deprecated-formats wallet
setting is added (off by default). This allows loading boost
format data if there is no alternative. It will likely go
at some point, along with the ability to load those.

Notably, the peer lists file still uses the boost serialization
code, as the data it stores is define in epee, while the new
serialization code is in monero, and migrating it was fairly
hairy. Since this file is local and not obtained from anyone
else, the marginal risk is minimal, but it could be migrated
later if needed.

Some tests and tools also do, this will stay as is for now.
2020-08-17 16:23:58 +00:00
Alexander Blair 9414194b1e
Merge pull request #6571
1d31e6c00 net_node: remove dead seed nodes (selsta)
2020-08-05 07:57:54 -07:00
Alexander Blair a0d179e528
Merge pull request #6512
5ef0607da Update copyright year to 2020 (SomaticFanatic)
2020-07-19 03:32:59 -07:00
Lee Clagett 7aeb503547 Fix boost <1.60 compilation and fix boost 1.73+ warnings 2020-05-31 21:18:11 -04:00
selsta 1d31e6c000
net_node: remove dead seed nodes 2020-05-20 01:06:03 +02:00