alibaba / alibaba/AliOS-Things

[Bug Report]: Outdated TensorFlow Sources (CVE-2022-35938)

Open
#2,022 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
4.6k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

### Contact Details

garnik645@gmail.com

### What happened?

The master branch of the AliOS-Things project contains unpatched sources from tflite-micro, in which CVE-2022-35938 was reported with critical severity. The function `GatherNd` from `AliOS-Things/components/ai_agent/src/engine/tflite-micro/tensorflow/lite/micro/kernels/gather_nd.cc` does not include security patches and updates available in newer versions of tflite-micro. The fix for CVE can be found in this commit: [tflite-micro commit](https://github.com/tensorflow/tflite-micro/commit/4142e47e9e31db481781b955ed3ff807a781b494).

To ensure that all security patches are applied, I strongly recommend updating the tflite-micro files in the project to the latest version available.

My report was primarily based on a static analysis tool developed at [CAST](https://castech.am/), which flagged the potential vulnerability due to similarities in the codebase.

### Version

master (Default)

### What soultions are you seeing the problem on?

_No response_

### Relevant log output

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with AliOS-Things/components/ai_agent/src/engine/tflite-micro/tensorflow/lite/micro/kernels/gather_nd.cc and compare its GatherNd implementation with the upstream tflite-micro commit 4142e47e9e31db481781b955ed3ff807a781b494. Review the surrounding vendored tflite-micro sources to determine the required update scope. Done means the affected sources include the CVE-2022-35938 security fixes and the project still builds successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, tensorflow
Domain
embedded-iot, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.