Cyber Risks · Trail of Bits Blog

Secure your machine learning with Semgrep

Summary: Trail of Bits added 11 Semgrep rules to its public ruleset targeting misuse of machine learning libraries, after analyzing the source code of many ML libraries for common problematic patterns. The rules cover issues including implicit pickling in PyTorch Distributed's broadcast_object_list, NumPy's allow_pickle flag, faulty random number generation across parallel data-loading workers, and NumPy operations inside Torch models.

Bottom line: Pickling is described in the source as incredibly insecure and able to lead to arbitrary code execution, and it still runs under the hood in libraries like PyTorch Distributed even where documentation warns about it. The rules exist because developers cannot be expected to fully examine the source code or documentation of every library in their pipeline.

Read the original at Trail of Bits Blog ↗

Mentions
CVE-2019-6446