Commit f92d542
selinux: fix avdcache auditing
The per-task avdcache was incorrectly saving and reusing the
audited vector computed by avc_audit_required() rather than
recomputing based on the currently requested permissions and
distinguishing the denied versus allowed cases. As a result,
some permission checks were not being audited, e.g.
directory write checks after a previously cached directory
search check.
Cc: stable@vger.kernel.org
Fixes: dde3a5d ("selinux: move avdcache to per-task security struct")
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
[PM: line wrap tweaks]
Signed-off-by: Paul Moore <paul@paul-moore.com>1 parent 1e5a8ee commit f92d542
2 files changed
Lines changed: 14 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3209 | 3209 | | |
3210 | 3210 | | |
3211 | 3211 | | |
3212 | | - | |
3213 | 3212 | | |
3214 | | - | |
| 3213 | + | |
3215 | 3214 | | |
3216 | 3215 | | |
3217 | 3216 | | |
3218 | 3217 | | |
3219 | | - | |
3220 | | - | |
| 3218 | + | |
3221 | 3219 | | |
3222 | 3220 | | |
3223 | 3221 | | |
| |||
3229 | 3227 | | |
3230 | 3228 | | |
3231 | 3229 | | |
3232 | | - | |
3233 | | - | |
3234 | | - | |
| 3230 | + | |
3235 | 3231 | | |
3236 | 3232 | | |
3237 | 3233 | | |
| |||
3252 | 3248 | | |
3253 | 3249 | | |
3254 | 3250 | | |
| 3251 | + | |
3255 | 3252 | | |
3256 | 3253 | | |
3257 | 3254 | | |
| |||
3273 | 3270 | | |
3274 | 3271 | | |
3275 | 3272 | | |
3276 | | - | |
3277 | | - | |
3278 | | - | |
3279 | | - | |
| 3273 | + | |
| 3274 | + | |
| 3275 | + | |
| 3276 | + | |
3280 | 3277 | | |
3281 | 3278 | | |
3282 | | - | |
3283 | | - | |
3284 | 3279 | | |
3285 | 3280 | | |
3286 | | - | |
3287 | | - | |
3288 | | - | |
3289 | | - | |
3290 | | - | |
| 3281 | + | |
| 3282 | + | |
3291 | 3283 | | |
3292 | 3284 | | |
| 3285 | + | |
| 3286 | + | |
| 3287 | + | |
3293 | 3288 | | |
3294 | 3289 | | |
3295 | 3290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
| 35 | + | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
| |||
0 commit comments