seinfoflow(1)

πŸ’– seinfoflow β€” the info-flow girlies' bestie πŸ’–

ok so bestie, you found it: seinfoflow(1), a SETools: SELinux Policy Analysis Tools situation. buckle up, we're doing information flow analysis on SELinux policies and it's gonna be ✨illuminating✨

πŸ¦‹ SYNOPSIS πŸ¦‹

seinfoflow [OPTIONS] -m MAP -s SOURCE [-t TARGET (-S|-A LIMIT)] [EXCLUDE
[EXCLUDE ...]]

that's the whole vibe. -m and -s are the mandatory girlies, everything else is optional but iconic.


🌸 DESCRIPTION 🌸

seinfoflow is a command line tool, and what it does is let you (yes you, gorgeous) perform information flow analyses on an SELinux policy. that's it, that's the whole job. lowkey powerful, no cap. πŸ’…

πŸ‘‘ POLICY πŸ‘‘

so the policy is a single file containing a binary policy. on Linux systems this file is usually named by version, for example policy.30 β€” so cute, so numbered. on Android systems this same file is usually named sepolicy. if you don't give it a policy file, seinfoflow will go search for the policy running on the current system, main character detective energy. and if it can't find any policy at all? it prints an error message and exits. no policy, no party. 😭

πŸŽ€ PERMISSION MAP πŸŽ€

this is a file containing mappings of object permissions for object classes. these mappings are the basis on how to compute the infoflow between types β€” like, they're literally the foundation, fr fr. on Debian, a standard permission map can be found when the package python3-sepolgen is installed, at /var/lib/sepolgen/perm_map. noted. screenshotting. πŸ“Έ


✨ OPTIONS ✨

🧚 Analysis Settings

  • -p POLICY β€” specify the policy to analyze. if none is specified, seinfoflow will search for the policy running on the current system, because she's resourceful like that.
  • -m MAP β€” specify the path to the permission map file to use in the information flow analysis. required, bestie, don't forget her.
  • -s SOURCE β€” specify the source type to use in the information flow analysis. also required. the origin story.
  • -t TARGET β€” specify the target type to use in the information flow analysis. heads up though: using this option will also require specifying an analysis algorithm. so don't come with -t and no algorithm, she will not accept that. πŸ™…

πŸ”₯ Analysis Algorithms

seinfoflow uses graph algorithms to analyze the information flow paths of an SELinux policy. the following algorithms are options for determining paths from a source type to a target type:

  • -S β€” print the shortest information flow path(s) from the source type to the target type. and if multiple paths have the same length? all will be displayed. everyone gets a turn, we don't gatekeep. πŸ’–
  • -A LIMIT β€” print all information flow path(s) up to LIMIT steps long. > ⚠️ depending on the connectiveness of the policy, a limit of 5 or more may be extremely expensive. like, your terminal will be sweating. be careful out there.

πŸ’œ Analysis Options

  • -w MIN_WEIGHT β€” specify the minimum permission weight to consider for the analysis (1-10). the default is 3.
  • -l LIMIT_FLOWS β€” specify the maximum number of information flows to output. the default is unlimited, so she'll yap forever unless you set a limit.
  • -o OUTPUT_PATH β€” generate a graphical representation of the analysis in PNG format at the specified path. pretty picture!! 🌈
  • -b <boolname>:true[,<boolname2>:false,...] β€” specify boolean values to use in the analysis. multiple booleans can be specified, separated by commas. alternatively, this option can be set with the special value -b default to use the default boolean values from the policy. and if this option is not specified at all, the analysis will include all possible infomation flows, including both "if" and "else" branches of boolean expressions. (yes, "infomation" β€” that's how the original spells it and I am not fixing her typo, I respect her too much. πŸ’€)
  • EXCLUDE β€” a space-separated list of types to exclude from the analysis. get them out of here. 🫢

⭐ General Options

  • -r, --reverse β€” display information flows into the source type. no effect if a target type is specified, so don't bother, it just won't do anything.
  • --stats β€” print information flow graph statistics at the end of the analysis. numbers!! we love a little data moment.
  • -h, --help β€” print help information and exit.
  • --full β€” print full rule lists for information flows. no truncation, we're reading the whole thing.
  • --version β€” print version information and exit.
  • -v, --verbose β€” print additional informational messages. she's chatty and we support her.
  • --debug β€” enable debugging output. for when you need to see everything. πŸ”

πŸ’€ EXAMPLE πŸ’€

show the shortest paths for process running as httpd_t to access user home files, using the default permission map:

# seinfoflow -s httpd_t -t user_home_t -S

list all data paths shorter than 3 steps from smbd_t to httpd_log_t, when samba_enable_home_dirs and samba_create_home_dirs booleans are enabled:

# seinfoflow -s smbd_t -t user_home_t -A 3 -b "samba_enable_home_dirs:true,samba_create_home_dirs:true"

ate. periodt. πŸ’…


🌷 AUTHOR 🌷

Chris PeBenito <pebenito@ieee.org> β€” the legend herself. bow down. πŸ‘‘

πŸ™ˆ BUGS πŸ™ˆ

please report bugs via the SETools bug tracker, https://github.com/SELinuxProject/setools/issues. she wants to know. she's listening. πŸ›

πŸ’œ SEE ALSO πŸ’œ

apol(1), sediff(1), sedta(1), seinfo(1), sesearch(1) β€” the whole friend group, go say hi.


and that's the page, bestie β€” brought to you by the SELinux Project, dated 2016-02-20, page seinfoflow(1). go analyze some information flow, you gorgeous genius. mwah. πŸ’‹βœ¨

πŸ“¦ where this page comes from
  • ubuntu stonking: setools 4.7.1-1
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms