-
Notifications
You must be signed in to change notification settings - Fork 27
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
Proposal: Addition of 2 linux tests #74
Conversation
Two new tests are being proposed within the linux schema. These are the "lsmod" and "modprobe" tests. See the proposal for more information and sample content/results.
Hey @wmunyan, these look pretty good (as in, reasonable and doable and important)! I'll take a closer look soon to insure they'll work as intended. |
Hi Bill, I think the lsmod_item/used_by should not represent a single string in the implied form of:
... but rather, it should have WDYT? |
Incidentally, this would probably mean also adding an EntityItemIntType for use_count, since as you noted the dependent modules are not always listed. |
@solind That sounds totally fine. I will make the schema updates and re-work my implementation to get some results including that update. Thanks very much for the quick feedback! |
Split up "use_count" and "used_by" into 2 fields.
Description updates for "use_count" and "used_by" elements.
Hi Bill, I attached a sample result for the lsmod_test. Let me know if I've missed anything. I also have some questions about the modprobe_test/object: (1) I see you want to limit the module_name/@operator to "equals" ... that's not very OVAL-ish, though. Aren't the possible input values limited to the same module names returned by the lsmod command? If so, there's no inherent reason we have to limit the input values. (2) I wasn't seeing any output using the command for randomly-selected modules, so I ran a command to try them all:
... and there was still no output! Under what conditions would there be any output from that command? |
David, I asked to some of our linux guys if there was a way to determine the list of all modules that were "loadable" and they pointed me to some information:
That command also takes into account compressed files, such as It may be that, to support operations other than "equals", a collector would need to parse the output of the above command. The name of the If that makes sense, and perhaps it'd be good to get some of the linux folks to chime in, I can make the necessary changes to the PR and re-commit. |
Hi Bill, One other issue is that without any kind of name validation, you can get a result like this: I'm not sure that's desirable either. So... hopefully we can get @isimluk to weight in with a recommendation. |
I haven't found any materials discussing use-cases for this new tests. Am I right, understanding that these probes are introduced so we can easily see whether certain kernel module is
? Are there any more use-cases we envision for these probes? My concern with the current modprobe test is that it is context dependent.
I am afraid, having the probe context dependent may become pain point and we should strive to avoid that.
I mean this problem may only lead to OVAL writers learning new idiom: using lsmod and modprobe together and thus increasing complexity of their job. Please don't get mad if I got too carried away, let's discuss what are the use-cases and our options. (By the way, why did we ruled out |
Simon, As for the code sample you provided, I had a question. If the If you were to use the I am seeing this as the first part of the output, which looks promising:
Does that output indicate those modules which are not loadable? Would that provide a more reasonable output than the |
Bill, You are right that Thinking about this more, perhaps we may want to make the kernel modules probe more high-level. Why should content writer need to know to use both lsmod and modprobe tests? Why should content writer need to know how to parse output of What if we introduced kernel_module test, and left the hard logic to the scanners (oval interpreters). Scanners are in sense tied to the platform, they need to be shipped/re-build on the platform. That would allow OVAL to be little more abstract. That is not to say, Bill, that we should scrape what you were able to put together here. I am just wondering what may be your opinion about this line of thinking? |
Simon, I am on PTO until the 2nd week in April, so I apologize both that this response was delayed, and responses until after April 5 will be delayed as well. Cheers! |
Repeating what was mentioned on the OVAL Board call today. This proposal is good as it is. However, if there is time to propose unified single and abstract test for probing kernel modules I see certain upside of it for the content writers. I am sorry for late response. |
All,
Attaching updated test content and results as well. Linux-Kernel-Module-Test-Content-and-Results-v3.zip |
Hey @wmunyan, where can I get the XSD changes comprising these tests? At your fork of this repository? |
@solind yes you can find the XSDs in my fork. |
Hi @wmunyan, it looks like you want to add three new Linux tests -- lsmod, modprobe and kernelmodule. Is that right? I thought the new kernelmodule test was supposed to supplant the other two. If there is a need to collect size, use_count or used_by information, that could be added to the kernelmodule_[state/item]. Wouldn't a consolidated test be preferred? |
Also, @wmunyan, there's a var_check="none exist" in your SSHD test content ... since that value of CheckEnumeration was deprecated in OVAL 5.3 and given the language in the OVAL specification document, I'm not really sure what that's attempting to express... EDIT: According to the OVAL specification section 5.3.6.4, I think what you want is "none satisfy"? |
@solind i do feel like a consolidated kernel module test would be preferred, but I guess I was leaving all 3 in there to illicit more comments. If folks feel like the single test is best, I can remove the other 2 and re-commit. Second, thanks for the content comment on the sshd test. I'll change that to "none satisfy" |
Hello everyone, I have modified the proposal, which is rendering this pull request obsolete. Please see the Pull Request for updated information. The short version:
I believe this pull request can be closed without merging. |
Two new tests are being proposed within the linux schema. These are the "lsmod" and "modprobe" tests. See the proposal for more information and sample content/results.