Skip to content

Report a possible bug related to address validation #3223

@AuYang261

Description

@AuYang261

I think there might be a bug in tensor_data_app_native function in core/iwasm/libraries/wasi-nn/src/utils/wasi_nn_app_native.c file: the last parameter passed to wasm_runtime_validate_app_addr should be total_elements * size of each element, which depending on input_tensor_wasm->type.

Because the parameter total_elements is the number of the elements in array pointed by input_tensor_wasm->data_offset, while the length of the array in bytes should be the number of elements * size of each element.

I wonder if my understanding is wrong. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwasi-nn

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions