Skip to content
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

vxworks OS_SymTableIterator() name arg too long #100

Closed
skliper opened this issue Sep 30, 2019 · 3 comments
Closed

vxworks OS_SymTableIterator() name arg too long #100

skliper opened this issue Sep 30, 2019 · 3 comments

Comments

@skliper
Copy link
Contributor

skliper commented Sep 30, 2019

The OS_SymTableIterator() name arg could be too long and could be strncpy/copied without a terminating null into SymbolRecord_t's char SymbolName[OS_MAX_SYM_LEN];. This unterminated null would then be written into the OS_sym_table_file_fd.

See osloader.c, ln 189.

Recommend: an explicit name length check:
{{{
if (strlen >= OS_MAX_SYM_LEN) {
return(FALSE);
}
}}}
before strncpy.

(Discovered as part of #45 coverage testing.)

@skliper skliper self-assigned this Sep 30, 2019
@skliper skliper added the bug label Sep 30, 2019
@skliper
Copy link
Contributor Author

skliper commented Sep 30, 2019

Imported from trac issue 77. Created by abrown4 on 2015-07-15T11:52:38, last modified: 2015-12-01T14:31:57

@skliper
Copy link
Contributor Author

skliper commented Sep 30, 2019

Trac comment by abrown4 on 2015-07-20 16:47:18:

commit: [changeset:17a4c30] Trac #100, Fixed vxworks OS_SymTableIterator() name arg too long.

Also supplied unit test to illustrate the problem and check fix.

@skliper
Copy link
Contributor Author

skliper commented Sep 30, 2019

Trac comment by abrown4 on 2015-11-25 13:01:49:

Traceability: This change is reflected in #135 [changeset:093359f]. Recommend closing #100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant