-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
π‘οΈ Halt Operation can lead to DOS #624
Comments
I agree with the recommandation to exclude potentially dangerous built-in predicates provided by ichiban/prolog (like I'm therefore in favour of the following strategic approach: only declare native predicates from the
The predicates from ichiban/prolog that we want to integrate as they are into the registry must therefore be re-exported in the // x/logic/predicate/file.go
// ... proper documentation ...
func Consult(vm *engine.VM, file engine.Term, cont engine.Cont, env *engine.Env) *engine.Promise {
return engine.Consult(vm, file, cont, env)
} |
Note
Severity: Info
target: v7.1.0 - Commit: 3c854270b006db30aa3894da2cdba10cc31b8c5f
Ref: OKP4 Blockchain Audit Report v1.0 - 02-05-2024 - BlockApex
Description
Okp4 supports rich set of prolog predicates. These predicates allows to define complex business logic and agreements conditions which can be queried and evaluated on-chain. Okp4 provides options to whitelist and blacklist the set of prolog predicates. One such predicates which caught our specific attention during our audit was
halt/1
. As per the swi-prolog documentation.If the Blockchain is bootstrapped using the default configuration and 'halt' is specifically not blacklisted opens the room for potential usage of the predicate which would result is the termination of the underlaying node.
Recommandation
If the
halt/1
is executed it would result in the termination of the blockchain process.Although Okp4 explicitly mentions the potential impact of the halt/1 butwe find it necessary to mention that since okp4 recommend it to blacklist this predicate, we propose that this predicate should be removed from the code because the potential impact of someone not blacklisting is very critical as it would result in the terminating of the Node.
The text was updated successfully, but these errors were encountered: