You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, 1 created-and-forgot alive account for each slot consumes 1 AccountsDB/AppendVec/mmap indefinitely. This means we can handle only 65530 (default /proc/sys/vm/max_map_count) slots.
So, just send small rent-exempt (it needs to be?) lamports to each of around 70000 random accounts for each new slot (~10 hour);
Then, the cluster dies unless specifically configured (this isn't advised in the docs), meaning this is DoS vulnerability.
Previously, we encountered this error: #5432
But, it wasn't regarded important at the time due to being caused by unrooted banks.
But, as I can demonstrate at the unit test code and integration test (#8932); this threat is real.
So, increasing /proc/sys/vm/max_map_count is one of mitigation. And indeed, various other mmap-based famous middlewares do so (see refs).
Nevertheless, to mitigate days-spanning attacks, I think we just need to introduce LRU eviction of old AppendVecs or similar other mechanism to avoid remote-controllable unbounded mmap usage.
Further, background old slot aggregation service can also be conceivable. But dunno the added complexity justifies for such cases in addition of LRU eviction.
Problem
Currently, 1 created-and-forgot alive account for each slot consumes 1 AccountsDB/AppendVec/mmap indefinitely. This means we can handle only 65530 (default
/proc/sys/vm/max_map_count
) slots.So, just send small rent-exempt (it needs to be?) lamports to each of around 70000 random accounts for each new slot (~10 hour);
Then, the cluster dies unless specifically configured (this isn't advised in the docs), meaning this is DoS vulnerability.
Previously, we encountered this error: #5432
But, it wasn't regarded important at the time due to being caused by unrooted banks.
But, as I can demonstrate at the unit test code and integration test (#8932); this threat is real.
Also, ad-hoc test is running here: https://metrics.solana.com:3000/d/V5LPmn_Zk/testnet-monitor-edge-ryoqun?orgId=2&from=now-3h&to=now&var-datasource=Solana%20Metrics%20(read-only)&var-testnet=testnet-dev-ryoqun&var-hostid=All
Proposed Solution
So, increasing
/proc/sys/vm/max_map_count
is one of mitigation. And indeed, various other mmap-based famous middlewares do so (see refs).Nevertheless, to mitigate days-spanning attacks, I think we just need to introduce LRU eviction of old AppendVecs or similar other mechanism to avoid remote-controllable unbounded
mmap
usage.Further, background old slot aggregation service can also be conceivable. But dunno the added complexity justifies for such cases in addition of LRU eviction.
refs
128000
: MongoDB: https://docs.mongodb.com/manual/administration/production-checklist-operations/262144
: ElasticSearch: https://www.elastic.co/guide/en/elasticsearch/reference/master/docker.html#docker-prod-prerequisites524288
: Varnish: https://image.slidesharecdn.com/fastlyvarnishnycmeetupfinal-140804141851-phpapp02/95/fastly-inaugural-nyc-varnish-meetup-25-638.jpg?cb=1407162101The text was updated successfully, but these errors were encountered: