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

Fix for smp request crash/hang on Adaptec adapters #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xiphmont
Copy link

@xiphmont xiphmont commented Mar 12, 2021

Two fixes:

Correct a serious memcpy bounds error causing all > 512 byte responses to crash the request and hang the aac interface. For example, this prevents zoning configuration requests from succeeding.

Fix a minor argument problem where checking for an unset i_params variable is branching based on stack garbage. This is relevant when -I is intuited rather than explicit.

Monty added 2 commits March 11, 2021 17:13
send_req_aac correctly calculates the maximum response size it can
process at a time with a 512 byte FIB data buffer, but inadvertanly
ignores this value and uses the full response length in the response
memcpy, corrupting memory when the response is greater than 512
bytes [minus headers] as with eg zone control requests.
Although the gpio utils already initialize the i_params
buffers, the other utilities do not.  In several places (eg,
in smp_initiator_open) this results in request decisions being made
based on preexisting stack contents when no interface parameter is
explicitly specified.

Patch kills this pattern globally and always initializes i_params.
@xiphmont xiphmont changed the title Fix several bugs causing smp requests to crash/hang on Adaptec adapters Fix for smp request crash/hang on Adaptec adapters Mar 12, 2021
@doug-gilbert
Copy link
Owner

Applied those fixes by hand on my local subversion repository and uploaded them here. Thanks for your input, sorry for the delay, expected to get an email from github as with some other repositories.

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

Successfully merging this pull request may close these issues.

2 participants