Sobelow.DOS.ModuleConcat (Sobelow v0.18.1)

View Source

Atom exhaustion through dynamic module names

Module.concat/1,2 creates module-name atoms. Unbounded names derived from request input can exhaust the VM's atom table, even if no module is loaded under those names. Atoms are not garbage collected.

Prefer an explicit lookup of allowed module names. Module.safe_concat/1,2 avoids creating new atoms, but still requires authorization of the module selected. Fully literal names are omitted. Computed names and attributes are retained; this check does not resolve their possible values.

https://security.erlef.org/secure_coding_and_deployment_hardening/atom_exhaustion.html

$ mix sobelow -i DOS.ModuleConcat

Summary

Functions

details()

id()

parse_def(fun)

rule()

run(fun, meta_file)