From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, 7/7] common: avb_verify: Fix division by zero in mmc_byte_io()
Date: Fri, 24 Aug 2018 16:09:59 -0400 [thread overview]
Message-ID: <20180824200959.GK26633@bill-the-cat> (raw)
In-Reply-To: <20180814004309.15271-7-erosca@de.adit-jv.com>
On Tue, Aug 14, 2018 at 02:43:09AM +0200, Eugeniu Rosca wrote:
> Compiling U-Boot with ubsan/asan libraries and running it in sandbox
> may lead to below backtrace:
>
> => avb init 0
> => avb verify
> ## Android Verified Boot 2.0 version 1.1.0
> read_is_device_unlocked not supported yet
> common/avb_verify.c:407:31: runtime error: division by zero
> AddressSanitizer:DEADLYSIGNAL
> Reviewed-by: Igor Opaniuk <igor.opaniuk@linaro.org>
>
> =================================================================
> ==9388==ERROR: AddressSanitizer: FPE on unknown address 0x0000004b467f \
> (pc 0x0000004b467f bp 0x000000000000 sp 0x7ffd899fe150 T0)
> #0 0x4b467e in mmc_byte_io common/avb_verify.c:407
> #1 0x4b4c47 in mmc_byte_io common/avb_verify.c:532
> #2 0x4b4c47 in read_from_partition common/avb_verify.c:533
> #3 0x69dc0d in load_and_verify_vbmeta lib/libavb/avb_slot_verify.c:560
> #4 0x6a1ee6 in avb_slot_verify lib/libavb/avb_slot_verify.c:1139
> #5 0x45dabd in do_avb_verify_part cmd/avb.c:245
> #6 0x4af77c in cmd_call common/command.c:499
> #7 0x4af77c in cmd_process common/command.c:538
> #8 0x46bafc in run_pipe_real common/cli_hush.c:1677
> #9 0x46bafc in run_list_real common/cli_hush.c:1875
> #10 0x46c780 in run_list common/cli_hush.c:2024
> #11 0x46c780 in parse_stream_outer common/cli_hush.c:3216
> #12 0x46d34b in parse_file_outer common/cli_hush.c:3299
> #13 0x4ad609 in cli_loop common/cli.c:217
> #14 0x4625ae in main_loop common/main.c:65
> #15 0x46f2d1 in run_main_loop common/board_r.c:648
> #16 0x640253 in initcall_run_list lib/initcall.c:30
> #17 0x46f9d0 in board_init_r common/board_r.c:879
> #18 0x40539b in main arch/sandbox/cpu/start.c:321
> #19 0x7fa94925f82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
> #20 0x408908 in _start (/srv/R/u-boot-master/u-boot+0x408908)
>
> AddressSanitizer can not provide additional info.
> SUMMARY: AddressSanitizer: FPE common/avb_verify.c:407 in mmc_byte_io
> ==9388==ABORTING
>
> Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180824/d655e39c/attachment.sig>
next prev parent reply other threads:[~2018-08-24 20:09 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-14 0:43 [U-Boot] [PATCH 1/7] libavb: Handle wrong hashtree_error_mode in avb_append_options() Eugeniu Rosca
2018-08-14 0:43 ` [U-Boot] [PATCH 2/7] common: avb_verify: Fix invalid 'for' loop condition Eugeniu Rosca
2018-08-16 8:34 ` Igor Opaniuk
2018-08-24 20:09 ` [U-Boot] [U-Boot, " Tom Rini
2018-08-14 0:43 ` [U-Boot] [PATCH 3/7] common: kconfig: Mark AVB_VERIFY as dependent on PARTITION_UUIDS Eugeniu Rosca
2018-08-16 8:38 ` Igor Opaniuk
2018-08-16 18:25 ` Eugeniu Rosca
2018-08-17 10:33 ` Igor Opaniuk
2018-08-24 20:09 ` [U-Boot] [U-Boot, " Tom Rini
2018-08-14 0:43 ` [U-Boot] [PATCH 4/7] common: avb_verify: Make local data static Eugeniu Rosca
2018-08-16 9:07 ` Igor Opaniuk
2018-08-16 18:34 ` Eugeniu Rosca
2018-08-24 20:09 ` [U-Boot] [U-Boot, " Tom Rini
2018-08-14 0:43 ` [U-Boot] [PATCH 5/7] common: avb_verify: Fix memory leaks Eugeniu Rosca
2018-08-16 9:18 ` Igor Opaniuk
2018-08-24 20:09 ` [U-Boot] [U-Boot,5/7] " Tom Rini
2018-08-14 0:43 ` [U-Boot] [PATCH 6/7] common: avb_verify: Fix never-occurring avb_free(ops_data) Eugeniu Rosca
2018-08-16 7:09 ` Igor Opaniuk
2018-08-24 20:09 ` [U-Boot] [U-Boot, " Tom Rini
2018-08-14 0:43 ` [U-Boot] [PATCH 7/7] common: avb_verify: Fix division by zero in mmc_byte_io() Eugeniu Rosca
2018-08-16 7:10 ` Igor Opaniuk
2018-08-24 20:09 ` Tom Rini [this message]
2018-08-16 8:34 ` [U-Boot] [PATCH 1/7] libavb: Handle wrong hashtree_error_mode in avb_append_options() Igor Opaniuk
2018-08-24 20:09 ` [U-Boot] [U-Boot, " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180824200959.GK26633@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox