Page MenuHomeFreeBSD

ctl: Correctly reject invalid service action for REPORT SUPPORTED OPCODES
Needs ReviewPublic

Authored by jhb on Mon, Sep 9, 6:14 PM.
Tags
None
Referenced Files
F95535114: D46611.diff
Sat, Sep 21, 9:51 AM
Unknown Object (File)
Fri, Sep 20, 6:06 AM
Unknown Object (File)
Wed, Sep 18, 9:08 AM
Unknown Object (File)
Tue, Sep 17, 6:38 AM
Unknown Object (File)
Mon, Sep 16, 6:48 PM
Unknown Object (File)
Sun, Sep 15, 8:49 PM
Unknown Object (File)
Sun, Sep 15, 6:47 PM
Unknown Object (File)
Sun, Sep 15, 8:22 AM
Subscribers

Details

Reviewers
asomers
emaste
khorben_defora.org
Group Reviewers
cam
Summary

The service action field is only the low 5 bits of byte 1 in the CDB.
The upper 3 bits are reserved. If any of those bits are reserved
regardless of the reporting options flags, fail the request with an
INVALID FIELD IN COMMAND specifying byte 1 as the illegal byte.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 59408
Build 56295: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Mon, Sep 9, 6:14 PM
jhb added inline comments.
sys/cam/ctl/ctl.c
7485

Note that this is not a generic "there's an invalid field in the command", but is specifically saying that the RSO_OPTIONS field in the cdb->options byte is invalid.

sys/cam/ctl/ctl.c
7439

Should "field" be 4 for REQUESTED SERVICE ACTION instead of 1 for SERVICE ACTION?

khorben_defora.org added a parent revision: Restricted Differential Revision.Tue, Sep 10, 10:56 PM
sys/cam/ctl/ctl.c
7439

Sigh, yes, and actually, it needs to be ignored for RSO_OPTIONS_ALL and RSO_OPTIONS_OC so I need to revisit this a bit.