OCaml: Privilege escalation — GLSA 201710-07

A vulnerability in OCaml may allow local users to gain root privileges.

Affected Packages

dev-lang/ocaml on all architectures
Affected versions < 4.04.2
Unaffected versions >= 4.04.2

Background

OCaml is a high-level, strongly-typed, functional, and object-oriented programming language from the ML family of languages.

Description

A bad sanitization of environment variables: CAML_CPLUGINS, CAML_NATIVE_CPLUGINS and CAML_BYTE_CPLUGINS in the OCaml compiler allows the execution of raised privileges via external code.

Impact

A local attacker, by using specially crafted environment variables, could possibly escalate privileges to the root group.

Workaround

There is no known workaround at this time.

Resolution

All OCaml users should upgrade to the latest version:

 # emerge --sync
 # emerge --ask --oneshot --verbose ">=dev-lang/ocaml-4.04.2"
 

References

Release Date
October 08, 2017

Latest Revision
October 08, 2017: 1

Severity
high

Exploitable
remote

Bugzilla entries