C++ API SparseApplyAdadelta
segfaults due to lack of shape check
#62978
Labels
comp:core
issues related to core part of tensorflow
comp:runtime
c++ runtime, performance issues (cpu)
stale
This label marks the issue/pr stale - to be closed automatically if no activity
stat:awaiting response
Status - Awaiting response from author
type:bug
Bug
Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
tf 2.17
Custom code
Yes
OS platform and distribution
Linux Ubuntu 22.04 LTS
Mobile device
No response
Python version
3.11.7
Bazel version
6.5.0
GCC/compiler version
clang 16
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
C++ API
SparseApplyAdadelta
segfaults due to lack of input shape check.Error location:
At
c->Dim(grad, 0)
, it reads 0th dim without checking rank ofgrad
. Therefore when a scalar(0-rank) is given for arggrad
it crashes.Note that same things happen for other
SparseApply*
APIs(SparseApplyAdagrad
,SparseApplyAdagradDA
,SparseApplyFtrl
,SparseApplyFtrlV2
,SparseApplyMomentum
,SparseApplyProximalAdagrad
,SparseApplyProximalGradientDescent
).Standalone code to reproduce the issue
Relevant log output
The text was updated successfully, but these errors were encountered: