这是indexloc提供的服务,不要输入任何密码
Skip to content

Fix decode_bmp crash by adding length check before reading the data in buffer #14967

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

Merged
merged 6 commits into from
Nov 30, 2017

Conversation

yongtang
Copy link
Member

This fix tries to address the issue raised in #14959 where the bmp content length was not checked before reading the buffer. As a result, decode_bmp might trigger a crash if the content of bmp is incomplete.

This fix fixes the issue by adding the needed check before reading the data.

Additional test cases have been added.

This fix fixes #14959.

Signed-off-by: Yong Tang yong.tang.github@outlook.com

…n buffer

This fix tries to address the issue raised in 14959 where
the bmp content length was not checked before reading the buffer.
As a result, decode_bmp might trigger a crash if the content of bmp
is incomplete.

This fix fixes the issue by adding the needed check before
reading the data.

This fix fixes 14959.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
@sb2nov sb2nov self-assigned this Nov 30, 2017
@sb2nov sb2nov added awaiting testing (then merge) and removed awaiting review Pull request awaiting review labels Nov 30, 2017
@sb2nov sb2nov merged commit 4cc4d53 into tensorflow:master Nov 30, 2017
@yongtang yongtang deleted the 14959-decode_bmp-file-size branch November 30, 2017 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]Out-of-Bounds Read in DecodeBmpOp class(tensorflow/core/kernels/decode_bmp_op.cc)
4 participants