Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > comp.unix.bsd.openbsd.misc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-16-2008, 07:27 AM
Karen Hill
 
Posts: n/a
Default Re: Tough question for oracle DBAs/Solaris Admins. Log shipping.

Stefaan A Eeckels wrote:
> On 1 Sep 2006 12:28:12 -0700
> "Karen Hill" <karen_hill22@yahoo.com> wrote:
>
> > Immutable files are files where not even root
> > can change/delete/move a file set as immutable.

>
> But root can unset the immutable flag. Thus it only serves as
> protection against accidental deletions or modifications. This is
> slightly useful. Roles are better for that purpose.


Not when they are at a networked run level according to the OpenBSD man
page on the subject. They would have to reboot, or bring it down to
single user mode to do that. Rebooting an OS running a production
database would be extremely difficult to cover by an admin.

> > For the Oracle DBAs, how can you guarentee an audit trail without
> > immutable files?

>
> You cannot guarantee it with immutable files.


Are you sure? I'm read in the man pages that root cannot change or
delete an immutable file in BSD without rebooting the server. And
restarting a server is something that one could easily detect. I'm
adding the openbsd group to see if they have anything to add of
relevance to the immutable file discussion.

OpenBSD is a great system, unfortunately, scaling up to the processor
level required to run a medium sized corporate database server is
something only Solaris / AIX seem to be able to do.

> Immutability is _not_ a security feature. It does _not_ solve the
> problem that root can change any file. If you cannot trust your root
> user, you've got major problems. Trust is a difficult concept for PHBs,
> but there is no magic solution.
> Learn to live with it.
>


When an auditor has to sign off on it, "learn to live with it" is not a
very good solution when dealing with Sarb-Ox.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-16-2008, 07:27 AM
Logan Shaw
 
Posts: n/a
Default Re: Tough question for oracle DBAs/Solaris Admins. Log shipping.

Karen Hill wrote:
> Stefaan A Eeckels wrote:
>> On 1 Sep 2006 12:28:12 -0700
>> "Karen Hill" <karen_hill22@yahoo.com> wrote:
>>
>>> Immutable files are files where not even root
>>> can change/delete/move a file set as immutable.

>> But root can unset the immutable flag. Thus it only serves as
>> protection against accidental deletions or modifications. This is
>> slightly useful. Roles are better for that purpose.

>
> Not when they are at a networked run level according to the OpenBSD man
> page on the subject. They would have to reboot, or bring it down to
> single user mode to do that.


Do you mean they'd have to reboot to do it at all, or do you mean that
they'd have to reboot to do it in a supported manner? I strongly
suspect it's the latter. After all, at some level, it's all bits and
bytes (both on disk and in RAM), so if you can execute privileged
instructions on the processor, you can do whatever you want, period.

- Logan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-16-2008, 07:27 AM
jKILLSPAM.schipper@math.uu.nl
 
Posts: n/a
Default Re: Tough question for oracle DBAs/Solaris Admins. Log shipping.

In comp.unix.bsd.openbsd.misc Logan Shaw <lshaw-usenet@austin.rr.com> wrote:
> Karen Hill wrote:
>> Stefaan A Eeckels wrote:
>>> On 1 Sep 2006 12:28:12 -0700
>>> "Karen Hill" <karen_hill22@yahoo.com> wrote:
>>>
>>>> Immutable files are files where not even root
>>>> can change/delete/move a file set as immutable.
>>> But root can unset the immutable flag. Thus it only serves as
>>> protection against accidental deletions or modifications. This is
>>> slightly useful. Roles are better for that purpose.

>>
>> Not when they are at a networked run level according to the OpenBSD man
>> page on the subject. They would have to reboot, or bring it down to
>> single user mode to do that.

>
> Do you mean they'd have to reboot to do it at all, or do you mean that
> they'd have to reboot to do it in a supported manner? I strongly
> suspect it's the latter. After all, at some level, it's all bits and
> bytes (both on disk and in RAM), so if you can execute privileged
> instructions on the processor, you can do whatever you want, period.


I am not currently aware of any way to change the runlevel from a
running OpenBSD system - by design, root cannot execute kernel-level
('priviliged' in your message, I believe) code.

One of the ways of doing this is denying access to kernel memory - see
mem(4), securelevel(7) on a OpenBSD system.

However, see my other message...

Joachim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-16-2008, 07:27 AM
jKILLSPAM.schipper@math.uu.nl
 
Posts: n/a
Default Re: Tough question for oracle DBAs/Solaris Admins. Log shipping.

In comp.unix.bsd.openbsd.misc Karen Hill <karen_hill22@yahoo.com> wrote:
> Stefaan A Eeckels wrote:
>> On 1 Sep 2006 12:28:12 -0700
>> "Karen Hill" <karen_hill22@yahoo.com> wrote:
>>
>> > Immutable files are files where not even root
>> > can change/delete/move a file set as immutable.

>>
>> But root can unset the immutable flag. Thus it only serves as
>> protection against accidental deletions or modifications. This is
>> slightly useful. Roles are better for that purpose.

>
> Not when they are at a networked run level according to the OpenBSD man
> page on the subject. They would have to reboot, or bring it down to
> single user mode to do that. Rebooting an OS running a production
> database would be extremely difficult to cover by an admin.


Note, though, that people *can* mount a filesystem over it. This
possibility has always been present and should be clear when reading the
manpage; however, it appears someone made a lot of noise, and NetBSD
and, I believe, FreeBSD patched runlevel(7) to disallow mounts. See the
Full-Disclosure archives, for instance, or
http://cve.mitre.org/cgi-bin/cvename...=CVE-2005-4351. (Note that
CVE is wrongly suggesting that newer OpenBSD versions are not
'vulnerable'.)

Theo decided against it, giving as a reason that runlevels are terribly
broken anyway. ISTR that the Linux maintainer didn't want to bother with
further tinkering and so let the issue slide.

>> > For the Oracle DBAs, how can you guarentee an audit trail without
>> > immutable files?

>>
>> You cannot guarantee it with immutable files.

>
> Are you sure? I'm read in the man pages that root cannot change or
> delete an immutable file in BSD without rebooting the server. And
> restarting a server is something that one could easily detect. I'm
> adding the openbsd group to see if they have anything to add of
> relevance to the immutable file discussion.


See the above.

> OpenBSD is a great system, unfortunately, scaling up to the processor
> level required to run a medium sized corporate database server is
> something only Solaris / AIX seem to be able to do.


I believe Linux is getting there, slowly - but yes, from what I've
heard, Solaris would be my system of choice.

Still, some clustering solutions can work well even on less bulky
machines.

>> Immutability is _not_ a security feature. It does _not_ solve the
>> problem that root can change any file. If you cannot trust your root
>> user, you've got major problems. Trust is a difficult concept for PHBs,
>> but there is no magic solution.
>> Learn to live with it.

>
> When an auditor has to sign off on it, "learn to live with it" is not a
> very good solution when dealing with Sarb-Ox.


Nonetheless, root still is god. There are some Linux patches that try to
change this (RSBAC is bundled with GrSecurity, and comes to mind; idem
for SELinux, and at least one alternative I forgot - I've not run Linux
for quite a while now), but they tend to either not work, break POSIX
compliance in a way that causes strange behaviour in quite a few cases,
or both. Of course, a knowledgeable admin can make them work...

Running everything chroot()ed, with no priviliges, is a far better
solution; add systrace(1) if you want to restrict the process further.
(Note that systrace(1) incurs a performance hit; also, I believe a port
to Linux is stabilizing.)


Finally, and this is inspired by the above discussion, Theo & friends
strongly believe in 'actual security' instead of 'security features' or
'auditability'. Linux + RSBAC is very auditable, but OpenBSD is likely
to be more secure, if only due to lack of kernel-level vulnerabilities.
Thus, OpenBSD is not the best system if you want auditability.

Joachim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-16-2008, 07:27 AM
Logan Shaw
 
Posts: n/a
Default Re: Tough question for oracle DBAs/Solaris Admins. Log shipping.

jKILLSPAM.schipper@math.uu.nl wrote:
> In comp.unix.bsd.openbsd.misc Logan Shaw <lshaw-usenet@austin.rr.com> wrote:
>> Karen Hill wrote:
>>> Stefaan A Eeckels wrote:
>>>> On 1 Sep 2006 12:28:12 -0700
>>>> "Karen Hill" <karen_hill22@yahoo.com> wrote:


>>>> But root can unset the immutable flag.


>>> Not when they are at a networked run level according to the OpenBSD man
>>> page on the subject. They would have to reboot, or bring it down to
>>> single user mode to do that.


>> Do you mean they'd have to reboot to do it at all, or do you mean that
>> they'd have to reboot to do it in a supported manner? I strongly
>> suspect it's the latter. After all, at some level, it's all bits and
>> bytes (both on disk and in RAM), so if you can execute privileged
>> instructions on the processor, you can do whatever you want, period.


> I am not currently aware of any way to change the runlevel from a
> running OpenBSD system - by design, root cannot execute kernel-level
> ('priviliged' in your message, I believe) code.
>
> One of the ways of doing this is denying access to kernel memory - see
> mem(4), securelevel(7) on a OpenBSD system.


Well, that's a very different kind of root than what I'm familiar with,
but I suppose you could do it that way.

I guess this means that if you try to go this route, you have to worry
about loadable kernel modules. Solaris, of course, has them and depends
heavily on them. Perhaps one solution to this is to make the entire
tree of kernel modules (including all the directories) immutable as well.

- Logan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-16-2008, 07:27 AM
jKILLSPAM.schipper@math.uu.nl
 
Posts: n/a
Default Re: Tough question for oracle DBAs/Solaris Admins. Log shipping.

In comp.unix.bsd.openbsd.misc Logan Shaw <lshaw-usenet@austin.rr.com> wrote:
> jKILLSPAM.schipper@math.uu.nl wrote:
>> In comp.unix.bsd.openbsd.misc Logan Shaw <lshaw-usenet@austin.rr.com> wrote:
>>> Karen Hill wrote:
>>>> Stefaan A Eeckels wrote:
>>>>> On 1 Sep 2006 12:28:12 -0700
>>>>> "Karen Hill" <karen_hill22@yahoo.com> wrote:

>
>>>>> But root can unset the immutable flag.

>
>>>> Not when they are at a networked run level according to the OpenBSD man
>>>> page on the subject. They would have to reboot, or bring it down to
>>>> single user mode to do that.

>
>>> Do you mean they'd have to reboot to do it at all, or do you mean that
>>> they'd have to reboot to do it in a supported manner? I strongly
>>> suspect it's the latter. After all, at some level, it's all bits and
>>> bytes (both on disk and in RAM), so if you can execute privileged
>>> instructions on the processor, you can do whatever you want, period.

>
>> I am not currently aware of any way to change the runlevel from a
>> running OpenBSD system - by design, root cannot execute kernel-level
>> ('priviliged' in your message, I believe) code.
>>
>> One of the ways of doing this is denying access to kernel memory - see
>> mem(4), securelevel(7) on a OpenBSD system.

>
> Well, that's a very different kind of root than what I'm familiar with,
> but I suppose you could do it that way.
>
> I guess this means that if you try to go this route, you have to worry
> about loadable kernel modules. Solaris, of course, has them and depends
> heavily on them. Perhaps one solution to this is to make the entire
> tree of kernel modules (including all the directories) immutable as well.


OpenBSD does not allow loading of kernel modules once the securelevel
has been raised above 0; this typically happens as part of the boot
procedure. This aspect of securelevels is actually quite useful.

Also, OpenBSD's kernel is not very modular - there is a module
framework, but almost everything is compiled straight into the kernel.
Only in rare circumstances do you actually load any modules - for
instance, the OpenAFS port needs a kernel module. But that's the only
one I ever needed.

This design actually makes a lot of sense; surely, modules can save a
small amount of memory, but it is usually not very significant. And it's
a rare occurence that even a Linux system loads a module once the system
is 'really up'.

Finally, note the aforementioned problem with immutable files - you can
always mount another file system over the parent directory (in OpenBSD,
obviously).

This is not to say that root can't do truly nasty stuff; trojaning all
binaries and rm'ing the rest is pretty bad, for instance, and messing
with the bootloader is always good fun... (although securelevel 2 would
prevent that, but very few systems run at securelevel 2, as quite a few
things - notably, parts of the firewall subsystem like ftp-proxy - have
difficulty working. Plus, it isn't the default.)

Joachim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-16-2008, 07:27 AM
Casper H.S. Dik
 
Posts: n/a
Default Re: Tough question for oracle DBAs/Solaris Admins. Log shipping.

jKILLSPAM.schipper@math.uu.nl writes:

>OpenBSD does not allow loading of kernel modules once the securelevel
>has been raised above 0; this typically happens as part of the boot
>procedure. This aspect of securelevels is actually quite useful.


It is somewhat problematic for a kernel as Solaris where everything
is rather dynamic; not being able to load the device driver for the
PCI device you've just hotplugged is a bit awkward.

Having the user immutability (which you can switch off) is useful in
itself because it prevents accidental deletion and modification.

In order to support hard immutability you can think of mechanisms like
file signatures; as long as you load only pre-configured trusted modules,
that is fine.

>This design actually makes a lot of sense; surely, modules can save a
>small amount of memory, but it is usually not very significant. And it's
>a rare occurence that even a Linux system loads a module once the system
>is 'really up'.


Not so on Solaris.

>Finally, note the aforementioned problem with immutable files - you can
>always mount another file system over the parent directory (in OpenBSD,
>obviously).


Sounds like a bug.

>This is not to say that root can't do truly nasty stuff; trojaning all
>binaries and rm'ing the rest is pretty bad, for instance, and messing
>with the bootloader is always good fun... (although securelevel 2 would
>prevent that, but very few systems run at securelevel 2, as quite a few
>things - notably, parts of the firewall subsystem like ftp-proxy - have
>difficulty working. Plus, it isn't the default.)


A lot of stuff becomes a lot harder when you can't change anything; for one,
administration without endangering uptime.

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-16-2008, 07:27 AM
Tim Bradshaw
 
Posts: n/a
Default Re: Tough question for oracle DBAs/Solaris Admins. Log shipping.

jKILLSPAM.schipper@math.uu.nl wrote:

> This design actually makes a lot of sense; surely, modules can save a
> small amount of memory, but it is usually not very significant. And it's
> a rare occurence that even a Linux system loads a module once the system
> is 'really up'.


This would be a disaster for Solaris, or for any other system which
needs to support dynamic reconfiguration. For instance devices (and
processors, memory etc) may appear and disappear at, really, any point
while the system is up, and it needs to be able to load and
(preferably) unload modules when this happens.

--tim

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-16-2008, 07:27 AM
jKILLSPAM.schipper@math.uu.nl
 
Posts: n/a
Default OpenBSD and Solaris (was: Tough question for oracle DBAs/Solaris Admins. Log shipping.)

In comp.unix.bsd.openbsd.misc Casper H.S. Dik <Casper.Dik@sun.com> wrote:
> jKILLSPAM.schipper@math.uu.nl writes:
>
>>OpenBSD does not allow loading of kernel modules once the securelevel
>>has been raised above 0; this typically happens as part of the boot
>>procedure. This aspect of securelevels is actually quite useful.

>
> It is somewhat problematic for a kernel as Solaris where everything
> is rather dynamic; not being able to load the device driver for the
> PCI device you've just hotplugged is a bit awkward.


Well, OpenBSD probably wouldn't handle the hotplugging, anyway.

> Having the user immutability (which you can switch off) is useful in
> itself because it prevents accidental deletion and modification.


OpenBSD's rm(1) does warn you when trying to delete a file that is
either not owned by you, not writable by you, or probably meets a list
of other criteria I can't think of offhand.

Such protections are not extended to root, though - root is presumed to
know what (s)he is doing.

> In order to support hard immutability you can think of mechanisms like
> file signatures; as long as you load only pre-configured trusted modules,
> that is fine.


Well, as long as the kernel can be trusted to verify these signatures
correctly, if I understand you correctly. This is not a given.

>>This design actually makes a lot of sense; surely, modules can save a
>>small amount of memory, but it is usually not very significant. And it's
>>a rare occurence that even a Linux system loads a module once the system
>>is 'really up'.

>
> Not so on Solaris.


Really? While I think the ability to *do* this hotplugging is really
neat, I would imagine that - outside of hotswapping disks - this would
be quite rare.

Just curious - do you need this feature often?

>>Finally, note the aforementioned problem with immutable files - you can
>>always mount another file system over the parent directory (in OpenBSD,
>>obviously).

>
> Sounds like a bug.


A lot of people agree with you; Theo, though, thinks securelevels are
broken anyways.

Most probably, both camps are right.

>>This is not to say that root can't do truly nasty stuff; trojaning all
>>binaries and rm'ing the rest is pretty bad, for instance, and messing
>>with the bootloader is always good fun... (although securelevel 2 would
>>prevent that, but very few systems run at securelevel 2, as quite a few
>>things - notably, parts of the firewall subsystem like ftp-proxy - have
>>difficulty working. Plus, it isn't the default.)

>
> A lot of stuff becomes a lot harder when you can't change anything; for one,
> administration without endangering uptime.


Indeed, which is another reason why securelevel 2 is not used often.

However, if OpenBSD is deployed as a redundant firewall, uptime becomes
much less important, and securelevel 2 might make sense. Still, I would
most likely not use it.

Joachim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-16-2008, 07:27 AM
jKILLSPAM.schipper@math.uu.nl
 
Posts: n/a
Default Re: Tough question for oracle DBAs/Solaris Admins. Log shipping.

In comp.unix.bsd.openbsd.misc Tim Bradshaw <tfb+google@tfeb.org> wrote:
> jKILLSPAM.schipper@math.uu.nl wrote:
>
>> This design actually makes a lot of sense; surely, modules can save a
>> small amount of memory, but it is usually not very significant. And it's
>> a rare occurence that even a Linux system loads a module once the system
>> is 'really up'.

>
> This would be a disaster for Solaris, or for any other system which
> needs to support dynamic reconfiguration. For instance devices (and
> processors, memory etc) may appear and disappear at, really, any point
> while the system is up, and it needs to be able to load and
> (preferably) unload modules when this happens.


I assume that some kind of warning must be given before one can remove
devices; still, this is 'wicked cool'.

Not enough to make me switch to Solaris, of course, but wicked cool.

There is, BTW, no particular requirement for dynamic loading; OpenBSD
just compiles every driver [1] into the kernel, so dynamic
reconfiguration can be done without loading any additional drivers.
However, I'm fairly certain most subsystems can't deal with devices
randomly appearing and disappearing - in particular, I'm fairly certain
the memory subsystem would get very, very confused.

Of course, you *can* plug in a USB device, and it will mostly Just Work
- but hotswapping CPUs is not possible.

Joachim

[1] Subject to certain constraints, mostly that the driver must be
stable, usable, and useful for more than ten persons or somesuch.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:03 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579