[13378] 2018-11-05_MacOS再次出现漏洞,号称牢不可破的系统也有弱点

文档创建者:s7ckTeam
浏览次数:14
最后更新:2025-01-18
2018-11-05_MacOS再次出现漏洞,号称牢不可破的系统也有弱点 M a c O S K a r u n e s h 9 1   F r e e B u f   2 0 1 8 - 1 1 - 0 5 * 便 m a c O S M a c 访 访 访 访 N F S M a c 使 N A S 2 0 1 8 7 9 M a c O S   1 0 . 1 3 . 6 N F S 西 使 广 使 m a c o s N F S 访 N F S 1 . 使 使 N F S N F S N F S 2 . 使 G u e s t N F S 访 C V E C V E - 2 0 1 8 - 4 2 5 9 C V E - 2 0 1 8 - 4 2 8 6 C V E - 2 0 1 8 - 4 2 8 7 C V E - 2 0 1 8 - 4 2 8 8 C V E - 2 0 1 8 - 4 2 9 1 2 0 1 8 5 2 1 1 4 P o C 使 0 4 0 9 6
4 0 9 6 1 2 8 P o C N F S N F S 使 r p c g e n P o C 4 6 C 6 3   R P C P o C N F S M a c n m r e p f h N F S N F S v 3 6 4 N F S v 4 1 2 8 X N U f h a n d l e _ t 1 2 8 n f s m _ c h a i n _ g e t _ f h 使 3 2 ( F H P ) - > f h _ l e n ( F H P ) - > f h _ d a t a n f s _ s o c k e t . c : 1 4 0 1 P o C b u g n f s m _ c h a i n _ g e t _ o p a q u e n f s m _ c h a i n _ g e t _ f h ( e r r o r ,   & n m r e p ,   n f s v e r s ,   f h ) ; / *   g e t   t h e   s i z e   o f   a n d   d a t a   f o r   a   f i l e   h a n d l e   i n   a n   m b u f   c h a i n   * / # d e f i n e   n f s m _ c h a i n _ g e t _ f h ( E ,   N M C ,   V E R S ,   F H P )       d o   {           i f   ( ( V E R S )   ! =   N F S _ V E R 2 )               n f s m _ c h a i n _ g e t _ 3 2 ( ( E ) ,   ( N M C ) ,   ( F H P ) - > f h _ l e n ) ;           e l s e               ( F H P ) - > f h _ l e n   =   N F S X _ V 2 F H ;         n f s m _ c h a i n _ g e t _ o p a q u e ( ( E ) ,   ( N M C ) ,   ( u i n t 3 2 _ t ) ( F H P ) - > f h _ l e n ,   ( F H P ) - > f h _ d a t a ) ;         i f   ( E )               ( F H P ) - > f h _ l e n   =   0 ;     }   w h i l e   ( 0 )
使 b f s n _ r n d u p L E N 4 b c o p y 使 L E N 0 x F F F F F F F F n f s m _ r n d u p r e n l e n 0 ( N M C ) - > n m c _ l e f t 使 0 x F F F F F F F F s i z e b c o p y 便 使 使 Q L Q L J o n a s   J e n s e n N F S C V E - 2 0 1 8 - 4 1 3 6 C V E - 2 0 1 8 - 4 1 6 0 b c o p y b c o p y b c o p y m b u f s i z e 使 n f s m _ c h a i n _ g e t _ f h / *   c o p y   t h e   n e x t   c o n s e c u t i v e   b y t e s   o f   o p a q u e   d a t a   f r o m   a n   m b u f   c h a i n   * / # d e f i n e   n f s m _ c h a i n _ g e t _ o p a q u e ( E ,   N M C ,   L E N ,   P T R )       d o   {           u i n t 3 2 _ t   r n d l e n ;           i f   ( E )   b r e a k ;           r n d l e n   =   n f s m _ r n d u p ( L E N ) ;           i f   ( ( N M C ) - > n m c _ l e f t   > =   r n d l e n )   {               u _ c h a r   * _ _ t m p p t r   =   ( u _ c h a r * ) ( N M C ) - > n m c _ p t r ;               ( N M C ) - > n m c _ l e f t   - =   r n d l e n ;               ( N M C ) - > n m c _ p t r   + =   r n d l e n ;               b c o p y ( _ _ t m p p t r ,   ( P T R ) ,   ( L E N ) ) ;           }   e l s e   {               ( E )   =   n f s m _ c h a i n _ g e t _ o p a q u e _ f ( ( N M C ) ,   ( L E N ) ,   ( u _ c h a r * ) ( P T R ) ) ;           }       }   w h i l e   ( 0 ) / * *   *   @ n a m e   b c o p y   o f   n e t w o r k   d a t a   *   @ d e s c r i p t i o n   C o p y i n g   a   v a r i a b l e - s i z e d   n e t w o r k   b u f f e r   i n t o   k e r n e l   m e m o r y   *   @ k i n d   p a t h - p r o b l e m   *   @ p r o b l e m . s e v e r i t y   w a r n i n g   *   @ i d   a p p l e - x n u / c p p / b c o p y - n e g a t i v e - s i z e   * / i m p o r t   c p p i m p o r t   s e m m l e . c o d e . c p p . d a t a f l o w . D a t a F l o w i m p o r t   s e m m l e . c o d e . c p p . r a n g e a n a l y s i s . S i m p l e R a n g e A n a l y s i s i m p o r t   D a t a F l o w : : P a t h G r a p h c l a s s   M y C f g   e x t e n d s   D a t a F l o w : : C o n f i g u r a t i o n   {     M y C f g ( )   {         t h i s   =   " M y C f g "     }     o v e r r i d e   p r e d i c a t e   i s S i n k ( D a t a F l o w : : N o d e   s i n k )   {         e x i s t s   ( F u n c t i o n C a l l   c a l l         |   s i n k . a s E x p r ( )   =   c a l l . g e t A r g u m e n t ( 1 )   a n d             c a l l . g e t T a r g e t ( ) . g e t N a m e ( )   =   " _ _ b u i l t i n _ _ _ m e m m o v e _ c h k "   a n d             n o t   c a l l . g e t A r g u m e n t ( 2 ) . i s C o n s t a n t ( ) )     }     o v e r r i d e   p r e d i c a t e   i s S o u r c e ( D a t a F l o w : : N o d e   s o u r c e )   {         s o u r c e . a s E x p r ( ) . ( F u n c t i o n C a l l ) . g e t T a r g e t ( ) . g e t N a m e ( )   =   " m b u f _ d a t a "     } } f r o m   D a t a F l o w : : P a t h N o d e   s i n k ,   D a t a F l o w : : P a t h N o d e   s o u r c e ,   M y C f g   d a t a F l o w w h e r e   d a t a F l o w . h a s F l o w P a t h ( s o u r c e ,   s i n k ) s e l e c t   s i n k ,   s o u r c e ,   s i n k ,   " b c o p y   o f   n e t w o r k   d a t a " i f   ( n   <   l i m i t )   {     b c o p y ( s r c ,   d s t ,   n ) ; }
使 G u a r d s g u a r d 使 使 g l o b a l V a l u e N u m b e r G l o b a l V a l u e N u m b e r i n g 使 r e l O p W i t h S w a p A n d N e g a t e s i z e m i n 使 l o w e r B o u n d i s S i n k 使 c h e c k e d S i z e / * *   *   H o l d s   i f   ` g u a r d `   i s   a   b o u n d s   c h e c k   w h i c h   e n s u r e s   t h a t   ` s i z e `   i s   l e s s   t h a n   *   ` l i m i t ` .   F o r   e x a m p l e :   *     *       i f   ( s i z e   <   l i m i t )   {   *           . . .   s i z e   . . .   *       }   * / p r e d i c a t e   g u a r d e d S i z e ( G u a r d C o n d i t i o n   g u a r d ,   E x p r   s i z e ,   E x p r   l i m i t ,                                             R e l a t i o n S t r i c t n e s s   s t r i c t )   {     e x i s t s   ( b o o l e a n   b r a n c h ,   E x p r   s z ,   B a s i c B l o c k   b l o c k     |   g u a r d . c o n t r o l s ( b l o c k ,   b r a n c h )   a n d         b l o c k . c o n t a i n s ( s i z e )   a n d         g l o b a l V a l u e N u m b e r ( s i z e )   =   g l o b a l V a l u e N u m b e r ( s z )   a n d         r e l O p W i t h S w a p A n d N e g a t e ( g u a r d ,   s z ,   l i m i t ,   L e s s e r ( ) ,   s t r i c t ,   b r a n c h ) ) } i f   ( p a c k e t . d a t a . s i z e   <   l i m i t )   {     . . .   p a c k e t . d a t a . s i z e   . . . } i f   ( p a c k e t . d a t a . s i z e   > =   l i m i t )   {     r e t u r n   - 1 ; }   e l s e   {     . . .   p a c k e t . d a t a . s i z e   . . . } / * *   *   H o l d s   i f   ` s i z e `   i s   b o u n d s   c h e c k e d   w i t h   a   c a l l   t o   ` m i n ` :   *     *         s i z e   =   m i n ( n ,   l i m i t ) ;   *   *         . . .   s i z e   . . .   * / p r e d i c a t e   m i n S i z e ( E x p r   s i z e )   {     e x i s t s   ( D a t a F l o w : : N o d e   s o u r c e ,   D a t a F l o w : : N o d e   s i n k     |   D a t a F l o w : : l o c a l F l o w ( s o u r c e ,   s i n k )   a n d         s o u r c e . a s E x p r ( ) . ( F u n c t i o n C a l l ) . g e t T a r g e t ( ) . g e t N a m e ( )   =   " m i n "   a n d         s i z e   =   s i n k . a s E x p r ( ) ) } / * *   *   H o l d s   i f   ` s i z e `   h a s   b e e n   b o u n d s   c h e c k e d .   * / p r e d i c a t e   c h e c k e d S i z e ( E x p r   s i z e )   {     l o w e r B o u n d ( s i z e )   > =   0   a n d     ( g u a r d e d S i z e ( _ ,   s i z e ,   _ ,   _ )   o r   m i n S i z e ( s i z e ) ) }
J e r e m y   A n d r u s 线 线 2 0 1 8 - 0 5 - 2 1 / * *   *   @ n a m e   b c o p y   o f   n e t w o r k   d a t a   *   @ d e s c r i p t i o n   C o p y i n g   a   v a r i a b l e - s i z e d   n e t w o r k   b u f f e r   i n t o   k e r n e l   m e m o r y   *   @ k i n d   p a t h - p r o b l e m   *   @ p r o b l e m . s e v e r i t y   w a r n i n g   *   @ i d   a p p l e - x n u / c p p / b c o p y - n e g a t i v e - s i z e   * / i m p o r t   c p p i m p o r t   s e m m l e . c o d e . c p p . v a l u e n u m b e r i n g . G l o b a l V a l u e N u m b e r i n g i m p o r t   s e m m l e . c o d e . c p p . c o n t r o l f l o w . G u a r d s i m p o r t   s e m m l e . c o d e . c p p . d a t a f l o w . D a t a F l o w i m p o r t   s e m m l e . c o d e . c p p . d a t a f l o w . T a i n t T r a c k i n g i m p o r t   s e m m l e . c o d e . c p p . r a n g e a n a l y s i s . R a n g e A n a l y s i s U t i l s i m p o r t   s e m m l e . c o d e . c p p . r a n g e a n a l y s i s . S i m p l e R a n g e A n a l y s i s i m p o r t   D a t a F l o w : : P a t h G r a p h / * *   *   H o l d s   i f   ` g u a r d `   i s   a   b o u n d s   c h e c k   w h i c h   e n s u r e s   t h a t   ` s i z e `   i s   l e s s   t h a n   *   ` l i m i t ` .   F o r   e x a m p l e :   *     *       i f   ( s i z e   <   l i m i t )   {   *           . . .   s i z e   . . .   *       }   * / p r e d i c a t e   g u a r d e d S i z e ( G u a r d C o n d i t i o n   g u a r d ,   E x p r   s i z e ,   E x p r   l i m i t ,                                             R e l a t i o n S t r i c t n e s s   s t r i c t )   {     e x i s t s   ( b o o l e a n   b r a n c h ,   E x p r   s z ,   B a s i c B l o c k   b l o c k     |   g u a r d . c o n t r o l s ( b l o c k ,   b r a n c h )   a n d         b l o c k . c o n t a i n s ( s i z e )   a n d         g l o b a l V a l u e N u m b e r ( s i z e )   =   g l o b a l V a l u e N u m b e r ( s z )   a n d         r e l O p W i t h S w a p A n d N e g a t e ( g u a r d ,   s z ,   l i m i t ,   L e s s e r ( ) ,   s t r i c t ,   b r a n c h ) ) } / * *   *   H o l d s   i f   ` s i z e `   i s   b o u n d s   c h e c k e d   w i t h   a   c a l l   t o   ` m i n ` :   *     *         s i z e   =   m i n ( n ,   l i m i t ) ;   *   *         . . .   s i z e   . . .   * / p r e d i c a t e   m i n S i z e ( E x p r   s i z e )   {     e x i s t s   ( D a t a F l o w : : N o d e   s o u r c e ,   D a t a F l o w : : N o d e   s i n k     |   D a t a F l o w : : l o c a l F l o w ( s o u r c e ,   s i n k )   a n d         s o u r c e . a s E x p r ( ) . ( F u n c t i o n C a l l ) . g e t T a r g e t ( ) . g e t N a m e ( )   =   " m i n "   a n d         s i z e   =   s i n k . a s E x p r ( ) ) } / * *   *   H o l d s   i f   ` s i z e `   h a s   b e e n   b o u n d s   c h e c k e d .   * / p r e d i c a t e   c h e c k e d S i z e ( E x p r   s i z e )   {     l o w e r B o u n d ( s i z e )   > =   0   a n d     ( g u a r d e d S i z e ( _ ,   s i z e ,   _ ,   _ )   o r   m i n S i z e ( s i z e ) ) } c l a s s   M y C f g   e x t e n d s   D a t a F l o w : : C o n f i g u r a t i o n   {     M y C f g ( )   {         t h i s   =   " M y C f g "     }     o v e r r i d e   p r e d i c a t e   i s S i n k ( D a t a F l o w : : N o d e   s i n k )   {         e x i s t s   ( F u n c t i o n C a l l   c a l l         |   s i n k . a s E x p r ( )   =   c a l l . g e t A r g u m e n t ( 1 )   a n d             c a l l . g e t T a r g e t ( ) . g e t N a m e ( )   =   " _ _ b u i l t i n _ _ _ m e m m o v e _ c h k "   a n d             n o t   c h e c k e d S i z e ( c a l l . g e t A r g u m e n t ( 2 ) ) )     }     o v e r r i d e   p r e d i c a t e   i s S o u r c e ( D a t a F l o w : : N o d e   s o u r c e )   {         s o u r c e . a s E x p r ( ) . ( F u n c t i o n C a l l ) . g e t T a r g e t ( ) . g e t N a m e ( )   =   " m b u f _ d a t a "     } } f r o m   D a t a F l o w : : P a t h N o d e   s i n k ,   D a t a F l o w : : P a t h N o d e   s o u r c e ,   M y C f g   d a t a F l o w w h e r e   d a t a F l o w . h a s F l o w P a t h ( s o u r c e ,   s i n k ) s e l e c t   s i n k ,   s o u r c e ,   s i n k ,   " b c o p y   o f   n e t w o r k   d a t a "
2 0 1 8 - 0 5 - 2 2 2 0 1 8 - 0 7 - 0 9 2 0 1 8 - 0 7 - 0 9 M a c O S   1 0 . 1 3 . 6 2 0 1 8 - 0 9 - 1 3 2 0 1 8 - 0 9 - 1 3 1 1 2 0 1 8 - 1 0 - 3 0 * l g t m K a r u n e s h 9 1 F r e e B u f . C O M
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则