idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
40,500
static void swevent_hlist_put(struct perf_event *event) { int cpu; for_each_possible_cpu(cpu) swevent_hlist_put_cpu(event, cpu); }
+Priv
0
static void swevent_hlist_put(struct perf_event *event) { int cpu; for_each_possible_cpu(cpu) swevent_hlist_put_cpu(event, cpu); }
@@ -906,6 +906,77 @@ static void put_ctx(struct perf_event_context *ctx) } } +/* + * Because of perf_event::ctx migration in sys_perf_event_open::move_group and + * perf_pmu_migrate_context() we need some magic. + * + * Those places that change perf_event::ctx will hold both + * perf_event_ctx::mutex of the 'old' ...
CWE-264
null
null
40,501
static void swevent_hlist_release(struct swevent_htable *swhash) { struct swevent_hlist *hlist = swevent_hlist_deref(swhash); if (!hlist) return; RCU_INIT_POINTER(swhash->swevent_hlist, NULL); kfree_rcu(hlist, rcu_head); }
+Priv
0
static void swevent_hlist_release(struct swevent_htable *swhash) { struct swevent_hlist *hlist = swevent_hlist_deref(swhash); if (!hlist) return; RCU_INIT_POINTER(swhash->swevent_hlist, NULL); kfree_rcu(hlist, rcu_head); }
@@ -906,6 +906,77 @@ static void put_ctx(struct perf_event_context *ctx) } } +/* + * Because of perf_event::ctx migration in sys_perf_event_open::move_group and + * perf_pmu_migrate_context() we need some magic. + * + * Those places that change perf_event::ctx will hold both + * perf_event_ctx::mutex of the 'old' ...
CWE-264
null
null
40,502
static void sync_child_event(struct perf_event *child_event, struct task_struct *child) { struct perf_event *parent_event = child_event->parent; u64 child_val; if (child_event->attr.inherit_stat) perf_event_read_event(child_event, child); child_val = perf_event_count(child_event); /* * Add back th...
+Priv
0
static void sync_child_event(struct perf_event *child_event, struct task_struct *child) { struct perf_event *parent_event = child_event->parent; u64 child_val; if (child_event->attr.inherit_stat) perf_event_read_event(child_event, child); child_val = perf_event_count(child_event); /* * Add back th...
@@ -906,6 +906,77 @@ static void put_ctx(struct perf_event_context *ctx) } } +/* + * Because of perf_event::ctx migration in sys_perf_event_open::move_group and + * perf_pmu_migrate_context() we need some magic. + * + * Those places that change perf_event::ctx will hold both + * perf_event_ctx::mutex of the 'old' ...
CWE-264
null
null
40,503
static void unaccount_event(struct perf_event *event) { if (event->parent) return; if (event->attach_state & PERF_ATTACH_TASK) static_key_slow_dec_deferred(&perf_sched_events); if (event->attr.mmap || event->attr.mmap_data) atomic_dec(&nr_mmap_events); if (event->attr.comm) atomic_dec(&nr_comm_events); if...
+Priv
0
static void unaccount_event(struct perf_event *event) { if (event->parent) return; if (event->attach_state & PERF_ATTACH_TASK) static_key_slow_dec_deferred(&perf_sched_events); if (event->attr.mmap || event->attr.mmap_data) atomic_dec(&nr_mmap_events); if (event->attr.comm) atomic_dec(&nr_comm_events); if...
@@ -906,6 +906,77 @@ static void put_ctx(struct perf_event_context *ctx) } } +/* + * Because of perf_event::ctx migration in sys_perf_event_open::move_group and + * perf_pmu_migrate_context() we need some magic. + * + * Those places that change perf_event::ctx will hold both + * perf_event_ctx::mutex of the 'old' ...
CWE-264
null
null
40,504
static void unaccount_event_cpu(struct perf_event *event, int cpu) { if (event->parent) return; if (has_branch_stack(event)) { if (!(event->attach_state & PERF_ATTACH_TASK)) atomic_dec(&per_cpu(perf_branch_stack_events, cpu)); } if (is_cgroup_event(event)) atomic_dec(&per_cpu(perf_cgroup_events, cpu)); }
+Priv
0
static void unaccount_event_cpu(struct perf_event *event, int cpu) { if (event->parent) return; if (has_branch_stack(event)) { if (!(event->attach_state & PERF_ATTACH_TASK)) atomic_dec(&per_cpu(perf_branch_stack_events, cpu)); } if (is_cgroup_event(event)) atomic_dec(&per_cpu(perf_cgroup_events, cpu)); }
@@ -906,6 +906,77 @@ static void put_ctx(struct perf_event_context *ctx) } } +/* + * Because of perf_event::ctx migration in sys_perf_event_open::move_group and + * perf_pmu_migrate_context() we need some magic. + * + * Those places that change perf_event::ctx will hold both + * perf_event_ctx::mutex of the 'old' ...
CWE-264
null
null
40,505
void update_perf_cpu_limits(void) { u64 tmp = perf_sample_period_ns; tmp *= sysctl_perf_cpu_time_max_percent; do_div(tmp, 100); ACCESS_ONCE(perf_sample_allowed_ns) = tmp; }
+Priv
0
void update_perf_cpu_limits(void) { u64 tmp = perf_sample_period_ns; tmp *= sysctl_perf_cpu_time_max_percent; do_div(tmp, 100); ACCESS_ONCE(perf_sample_allowed_ns) = tmp; }
@@ -906,6 +906,77 @@ static void put_ctx(struct perf_event_context *ctx) } } +/* + * Because of perf_event::ctx migration in sys_perf_event_open::move_group and + * perf_pmu_migrate_context() we need some magic. + * + * Those places that change perf_event::ctx will hold both + * perf_event_ctx::mutex of the 'old' ...
CWE-264
null
null
40,506
MagickExport MagickBooleanType AutoGammaImage(Image *image, ExceptionInfo *exception) { double gamma, log_mean, mean, sans; MagickStatusType status; register ssize_t i; log_mean=log(0.5); if (image->channel_mask == DefaultChannels) { /* Apply gamma correction equ...
Overflow
0
MagickExport MagickBooleanType AutoGammaImage(Image *image, ExceptionInfo *exception) { double gamma, log_mean, mean, sans; MagickStatusType status; register ssize_t i; log_mean=log(0.5); if (image->channel_mask == DefaultChannels) { /* Apply gamma correction equ...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,507
MagickExport MagickBooleanType AutoLevelImage(Image *image, ExceptionInfo *exception) { return(MinMaxStretchImage(image,0.0,0.0,1.0,exception)); }
Overflow
0
MagickExport MagickBooleanType AutoLevelImage(Image *image, ExceptionInfo *exception) { return(MinMaxStretchImage(image,0.0,0.0,1.0,exception)); }
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,508
MagickExport MagickBooleanType BrightnessContrastImage(Image *image, const double brightness,const double contrast,ExceptionInfo *exception) { #define BrightnessContastImageTag "BrightnessContast/Image" double alpha, coefficients[2], intercept, slope; MagickBooleanType status; /* Com...
Overflow
0
MagickExport MagickBooleanType BrightnessContrastImage(Image *image, const double brightness,const double contrast,ExceptionInfo *exception) { #define BrightnessContastImageTag "BrightnessContast/Image" double alpha, coefficients[2], intercept, slope; MagickBooleanType status; /* Com...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,509
MagickExport MagickBooleanType ClutImage(Image *image,const Image *clut_image, const PixelInterpolateMethod method,ExceptionInfo *exception) { #define ClutImageTag "Clut/Image" CacheView *clut_view, *image_view; MagickBooleanType status; MagickOffsetType progress; PixelInfo *clut_map;...
Overflow
0
MagickExport MagickBooleanType ClutImage(Image *image,const Image *clut_image, const PixelInterpolateMethod method,ExceptionInfo *exception) { #define ClutImageTag "Clut/Image" CacheView *clut_view, *image_view; MagickBooleanType status; MagickOffsetType progress; PixelInfo *clut_map;...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,510
MagickExport MagickBooleanType ColorDecisionListImage(Image *image, const char *color_correction_collection,ExceptionInfo *exception) { #define ColorDecisionListCorrectImageTag "ColorDecisionList/Image" typedef struct _Correction { double slope, offset, power; } Correction; typedef st...
Overflow
0
MagickExport MagickBooleanType ColorDecisionListImage(Image *image, const char *color_correction_collection,ExceptionInfo *exception) { #define ColorDecisionListCorrectImageTag "ColorDecisionList/Image" typedef struct _Correction { double slope, offset, power; } Correction; typedef st...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,511
MagickExport Image *EnhanceImage(const Image *image,ExceptionInfo *exception) { #define EnhanceImageTag "Enhance/Image" #define EnhancePixel(weight) \ mean=QuantumScale*((double) GetPixelRed(image,r)+pixel.red)/2.0; \ distance=QuantumScale*((double) GetPixelRed(image,r)-pixel.red); \ distance_squared=(4.0+mean)*...
Overflow
0
MagickExport Image *EnhanceImage(const Image *image,ExceptionInfo *exception) { #define EnhanceImageTag "Enhance/Image" #define EnhancePixel(weight) \ mean=QuantumScale*((double) GetPixelRed(image,r)+pixel.red)/2.0; \ distance=QuantumScale*((double) GetPixelRed(image,r)-pixel.red); \ distance_squared=(4.0+mean)*...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,512
MagickExport MagickBooleanType GammaImage(Image *image,const double gamma, ExceptionInfo *exception) { #define GammaCorrectImageTag "GammaCorrect/Image" CacheView *image_view; MagickBooleanType status; MagickOffsetType progress; Quantum *gamma_map; register ssize_t i; ssize_t ...
Overflow
0
MagickExport MagickBooleanType GammaImage(Image *image,const double gamma, ExceptionInfo *exception) { #define GammaCorrectImageTag "GammaCorrect/Image" CacheView *image_view; MagickBooleanType status; MagickOffsetType progress; Quantum *gamma_map; register ssize_t i; ssize_t ...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,513
MagickExport MagickBooleanType GrayscaleImage(Image *image, const PixelIntensityMethod method,ExceptionInfo *exception) { #define GrayscaleImageTag "Grayscale/Image" CacheView *image_view; MagickBooleanType status; MagickOffsetType progress; ssize_t y; assert(image != (Image *) NULL); ...
Overflow
0
MagickExport MagickBooleanType GrayscaleImage(Image *image, const PixelIntensityMethod method,ExceptionInfo *exception) { #define GrayscaleImageTag "Grayscale/Image" CacheView *image_view; MagickBooleanType status; MagickOffsetType progress; ssize_t y; assert(image != (Image *) NULL); ...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,514
static inline double InverseScaledSigmoidal(const double a,const double b, const double x) { const double sig0=Sigmoidal(a,b,0.0); const double sig1=Sigmoidal(a,b,1.0); const double argument=(sig1-sig0)*x+sig0; const double clamped= ( #if defined(MAGICKCORE_HAVE_ATANH) argument < -1+MagickEpsilon ...
Overflow
0
static inline double InverseScaledSigmoidal(const double a,const double b, const double x) { const double sig0=Sigmoidal(a,b,0.0); const double sig1=Sigmoidal(a,b,1.0); const double argument=(sig1-sig0)*x+sig0; const double clamped= ( #if defined(MAGICKCORE_HAVE_ATANH) argument < -1+MagickEpsilon ...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,515
MagickExport MagickBooleanType LevelImage(Image *image,const double black_point, const double white_point,const double gamma,ExceptionInfo *exception) { #define LevelImageTag "Level/Image" CacheView *image_view; MagickBooleanType status; MagickOffsetType progress; register ssize_t i; s...
Overflow
0
MagickExport MagickBooleanType LevelImage(Image *image,const double black_point, const double white_point,const double gamma,ExceptionInfo *exception) { #define LevelImageTag "Level/Image" CacheView *image_view; MagickBooleanType status; MagickOffsetType progress; register ssize_t i; s...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,516
MagickExport MagickBooleanType LevelImageColors(Image *image, const PixelInfo *black_color,const PixelInfo *white_color, const MagickBooleanType invert,ExceptionInfo *exception) { ChannelType channel_mask; MagickStatusType status; /* Allocate and initialize levels map. */ assert(image != (Im...
Overflow
0
MagickExport MagickBooleanType LevelImageColors(Image *image, const PixelInfo *black_color,const PixelInfo *white_color, const MagickBooleanType invert,ExceptionInfo *exception) { ChannelType channel_mask; MagickStatusType status; /* Allocate and initialize levels map. */ assert(image != (Im...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,517
MagickExport MagickBooleanType LevelizeImage(Image *image, const double black_point,const double white_point,const double gamma, ExceptionInfo *exception) { #define LevelizeImageTag "Levelize/Image" #define LevelizeValue(x) ClampToQuantum(((MagickRealType) gamma_pow((double) \ (QuantumScale*(x)),gamma))*(white_p...
Overflow
0
MagickExport MagickBooleanType LevelizeImage(Image *image, const double black_point,const double white_point,const double gamma, ExceptionInfo *exception) { #define LevelizeImageTag "Levelize/Image" #define LevelizeValue(x) ClampToQuantum(((MagickRealType) gamma_pow((double) \ (QuantumScale*(x)),gamma))*(white_p...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,518
MagickExport MagickBooleanType LinearStretchImage(Image *image, const double black_point,const double white_point,ExceptionInfo *exception) { #define LinearStretchImageTag "LinearStretch/Image" CacheView *image_view; double *histogram, intensity; MagickBooleanType status; ssize_t blac...
Overflow
0
MagickExport MagickBooleanType LinearStretchImage(Image *image, const double black_point,const double white_point,ExceptionInfo *exception) { #define LinearStretchImageTag "LinearStretch/Image" CacheView *image_view; double *histogram, intensity; MagickBooleanType status; ssize_t blac...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,519
static inline void ModulateHCL(const double percent_hue, const double percent_chroma,const double percent_luma,double *red, double *green,double *blue) { double hue, luma, chroma; /* Increase or decrease color luma, chroma, or hue. */ ConvertRGBToHCL(*red,*green,*blue,&hue,&chroma,&luma); ...
Overflow
0
static inline void ModulateHCL(const double percent_hue, const double percent_chroma,const double percent_luma,double *red, double *green,double *blue) { double hue, luma, chroma; /* Increase or decrease color luma, chroma, or hue. */ ConvertRGBToHCL(*red,*green,*blue,&hue,&chroma,&luma); ...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,520
static inline void ModulateHCLp(const double percent_hue, const double percent_chroma,const double percent_luma,double *red, double *green,double *blue) { double hue, luma, chroma; /* Increase or decrease color luma, chroma, or hue. */ ConvertRGBToHCLp(*red,*green,*blue,&hue,&chroma,&luma);...
Overflow
0
static inline void ModulateHCLp(const double percent_hue, const double percent_chroma,const double percent_luma,double *red, double *green,double *blue) { double hue, luma, chroma; /* Increase or decrease color luma, chroma, or hue. */ ConvertRGBToHCLp(*red,*green,*blue,&hue,&chroma,&luma);...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,521
static inline void ModulateHSB(const double percent_hue, const double percent_saturation,const double percent_brightness,double *red, double *green,double *blue) { double brightness, hue, saturation; /* Increase or decrease color brightness, saturation, or hue. */ ConvertRGBToHSB(*red,*gree...
Overflow
0
static inline void ModulateHSB(const double percent_hue, const double percent_saturation,const double percent_brightness,double *red, double *green,double *blue) { double brightness, hue, saturation; /* Increase or decrease color brightness, saturation, or hue. */ ConvertRGBToHSB(*red,*gree...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,522
static inline void ModulateHSI(const double percent_hue, const double percent_saturation,const double percent_intensity,double *red, double *green,double *blue) { double intensity, hue, saturation; /* Increase or decrease color intensity, saturation, or hue. */ ConvertRGBToHSI(*red,*green,*...
Overflow
0
static inline void ModulateHSI(const double percent_hue, const double percent_saturation,const double percent_intensity,double *red, double *green,double *blue) { double intensity, hue, saturation; /* Increase or decrease color intensity, saturation, or hue. */ ConvertRGBToHSI(*red,*green,*...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,523
static inline void ModulateHSL(const double percent_hue, const double percent_saturation,const double percent_lightness,double *red, double *green,double *blue) { double hue, lightness, saturation; /* Increase or decrease color lightness, saturation, or hue. */ ConvertRGBToHSL(*red,*green,*...
Overflow
0
static inline void ModulateHSL(const double percent_hue, const double percent_saturation,const double percent_lightness,double *red, double *green,double *blue) { double hue, lightness, saturation; /* Increase or decrease color lightness, saturation, or hue. */ ConvertRGBToHSL(*red,*green,*...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,524
static inline void ModulateHSV(const double percent_hue, const double percent_saturation,const double percent_value,double *red, double *green,double *blue) { double hue, saturation, value; /* Increase or decrease color value, saturation, or hue. */ ConvertRGBToHSV(*red,*green,*blue,&hue,&s...
Overflow
0
static inline void ModulateHSV(const double percent_hue, const double percent_saturation,const double percent_value,double *red, double *green,double *blue) { double hue, saturation, value; /* Increase or decrease color value, saturation, or hue. */ ConvertRGBToHSV(*red,*green,*blue,&hue,&s...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,525
static inline void ModulateHWB(const double percent_hue, const double percent_whiteness,const double percent_blackness,double *red, double *green,double *blue) { double blackness, hue, whiteness; /* Increase or decrease color blackness, whiteness, or hue. */ ConvertRGBToHWB(*red,*green,*blu...
Overflow
0
static inline void ModulateHWB(const double percent_hue, const double percent_whiteness,const double percent_blackness,double *red, double *green,double *blue) { double blackness, hue, whiteness; /* Increase or decrease color blackness, whiteness, or hue. */ ConvertRGBToHWB(*red,*green,*blu...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,526
MagickExport MagickBooleanType ModulateImage(Image *image,const char *modulate, ExceptionInfo *exception) { #define ModulateImageTag "Modulate/Image" CacheView *image_view; ColorspaceType colorspace; const char *artifact; double percent_brightness, percent_hue, percent_saturation;...
Overflow
0
MagickExport MagickBooleanType ModulateImage(Image *image,const char *modulate, ExceptionInfo *exception) { #define ModulateImageTag "Modulate/Image" CacheView *image_view; ColorspaceType colorspace; const char *artifact; double percent_brightness, percent_hue, percent_saturation;...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,527
static inline void ModulateLCHab(const double percent_luma, const double percent_chroma,const double percent_hue,double *red, double *green,double *blue) { double hue, luma, chroma; /* Increase or decrease color luma, chroma, or hue. */ ConvertRGBToLCHab(*red,*green,*blue,&luma,&chroma,&hue...
Overflow
0
static inline void ModulateLCHab(const double percent_luma, const double percent_chroma,const double percent_hue,double *red, double *green,double *blue) { double hue, luma, chroma; /* Increase or decrease color luma, chroma, or hue. */ ConvertRGBToLCHab(*red,*green,*blue,&luma,&chroma,&hue...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,528
static inline void ModulateLCHuv(const double percent_luma, const double percent_chroma,const double percent_hue,double *red, double *green,double *blue) { double hue, luma, chroma; /* Increase or decrease color luma, chroma, or hue. */ ConvertRGBToLCHuv(*red,*green,*blue,&luma,&chroma,&hue...
Overflow
0
static inline void ModulateLCHuv(const double percent_luma, const double percent_chroma,const double percent_hue,double *red, double *green,double *blue) { double hue, luma, chroma; /* Increase or decrease color luma, chroma, or hue. */ ConvertRGBToLCHuv(*red,*green,*blue,&luma,&chroma,&hue...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,529
MagickExport MagickBooleanType NegateImage(Image *image, const MagickBooleanType grayscale,ExceptionInfo *exception) { #define NegateImageTag "Negate/Image" CacheView *image_view; MagickBooleanType status; MagickOffsetType progress; register ssize_t i; ssize_t y; assert(image !=...
Overflow
0
MagickExport MagickBooleanType NegateImage(Image *image, const MagickBooleanType grayscale,ExceptionInfo *exception) { #define NegateImageTag "Negate/Image" CacheView *image_view; MagickBooleanType status; MagickOffsetType progress; register ssize_t i; ssize_t y; assert(image !=...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,530
MagickExport MagickBooleanType SigmoidalContrastImage(Image *image, const MagickBooleanType sharpen,const double contrast,const double midpoint, ExceptionInfo *exception) { #define SigmoidalContrastImageTag "SigmoidalContrast/Image" #define ScaledSig(x) ( ClampToQuantum(QuantumRange* \ ScaledSigmoidal(contrast,Q...
Overflow
0
MagickExport MagickBooleanType SigmoidalContrastImage(Image *image, const MagickBooleanType sharpen,const double contrast,const double midpoint, ExceptionInfo *exception) { #define SigmoidalContrastImageTag "SigmoidalContrast/Image" #define ScaledSig(x) ( ClampToQuantum(QuantumRange* \ ScaledSigmoidal(contrast,Q...
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,531
static inline double gamma_pow(const double value,const double gamma) { return(value < 0.0 ? value : pow(value,gamma)); }
Overflow
0
static inline double gamma_pow(const double value,const double gamma) { return(value < 0.0 ? value : pow(value,gamma)); }
@@ -1049,6 +1049,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (SetImageGray(image,exception) != MagickFalse) (void) SetImageColorspace(image,GRAYColorspace,exception); + if (SyncImagePixelCache(image,exc...
CWE-125
null
null
40,532
SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd, unsigned long, arg) { int error; struct fd f = fdget(fd); if (!f.file) return -EBADF; error = security_file_ioctl(f.file, cmd, arg); if (!error) error = do_vfs_ioctl(f.file, fd, cmd, arg); fdput(f); return error; }
DoS Overflow +Priv
0
SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd, unsigned long, arg) { int error; struct fd f = fdget(fd); if (!f.file) return -EBADF; error = security_file_ioctl(f.file, cmd, arg); if (!error) error = do_vfs_ioctl(f.file, fd, cmd, arg); fdput(f); return error; }
@@ -590,6 +590,7 @@ static long ioctl_file_dedupe_range(struct file *file, void __user *arg) goto out; } + same->dest_count = count; ret = vfs_dedupe_file_range(file, same); if (ret) goto out;
CWE-119
null
null
40,533
int __generic_block_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, loff_t start, loff_t len, get_block_t *get_block) { struct buffer_head map_bh; sector_t start_blk, last_blk; loff_t isize = i_size_read(inode); u64 logical = 0, phys = 0, size = 0; u32 flags = FIEMAP_EXTENT_MERGED; boo...
DoS Overflow +Priv
0
int __generic_block_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, loff_t start, loff_t len, get_block_t *get_block) { struct buffer_head map_bh; sector_t start_blk, last_blk; loff_t isize = i_size_read(inode); u64 logical = 0, phys = 0, size = 0; u32 flags = FIEMAP_EXTENT_MERGED; boo...
@@ -590,6 +590,7 @@ static long ioctl_file_dedupe_range(struct file *file, void __user *arg) goto out; } + same->dest_count = count; ret = vfs_dedupe_file_range(file, same); if (ret) goto out;
CWE-119
null
null
40,534
static inline loff_t blk_to_logical(struct inode *inode, sector_t blk) { return (blk << inode->i_blkbits); }
DoS Overflow +Priv
0
static inline loff_t blk_to_logical(struct inode *inode, sector_t blk) { return (blk << inode->i_blkbits); }
@@ -590,6 +590,7 @@ static long ioctl_file_dedupe_range(struct file *file, void __user *arg) goto out; } + same->dest_count = count; ret = vfs_dedupe_file_range(file, same); if (ret) goto out;
CWE-119
null
null
40,535
int fiemap_check_flags(struct fiemap_extent_info *fieinfo, u32 fs_flags) { u32 incompat_flags; incompat_flags = fieinfo->fi_flags & ~(FIEMAP_FLAGS_COMPAT & fs_flags); if (incompat_flags) { fieinfo->fi_flags = incompat_flags; return -EBADR; } return 0; }
DoS Overflow +Priv
0
int fiemap_check_flags(struct fiemap_extent_info *fieinfo, u32 fs_flags) { u32 incompat_flags; incompat_flags = fieinfo->fi_flags & ~(FIEMAP_FLAGS_COMPAT & fs_flags); if (incompat_flags) { fieinfo->fi_flags = incompat_flags; return -EBADR; } return 0; }
@@ -590,6 +590,7 @@ static long ioctl_file_dedupe_range(struct file *file, void __user *arg) goto out; } + same->dest_count = count; ret = vfs_dedupe_file_range(file, same); if (ret) goto out;
CWE-119
null
null
40,536
int fiemap_fill_next_extent(struct fiemap_extent_info *fieinfo, u64 logical, u64 phys, u64 len, u32 flags) { struct fiemap_extent extent; struct fiemap_extent __user *dest = fieinfo->fi_extents_start; /* only count the extents */ if (fieinfo->fi_extents_max == 0) { fieinfo->fi_extents_mapped++; return (...
DoS Overflow +Priv
0
int fiemap_fill_next_extent(struct fiemap_extent_info *fieinfo, u64 logical, u64 phys, u64 len, u32 flags) { struct fiemap_extent extent; struct fiemap_extent __user *dest = fieinfo->fi_extents_start; /* only count the extents */ if (fieinfo->fi_extents_max == 0) { fieinfo->fi_extents_mapped++; return (...
@@ -590,6 +590,7 @@ static long ioctl_file_dedupe_range(struct file *file, void __user *arg) goto out; } + same->dest_count = count; ret = vfs_dedupe_file_range(file, same); if (ret) goto out;
CWE-119
null
null
40,537
static int file_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { struct inode *inode = file_inode(filp); int __user *p = (int __user *)arg; switch (cmd) { case FIBMAP: return ioctl_fibmap(filp, p); case FIONREAD: return put_user(i_size_read(inode) - filp->f_pos, p); case FS_IOC_RESVSP: case...
DoS Overflow +Priv
0
static int file_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { struct inode *inode = file_inode(filp); int __user *p = (int __user *)arg; switch (cmd) { case FIBMAP: return ioctl_fibmap(filp, p); case FIONREAD: return put_user(i_size_read(inode) - filp->f_pos, p); case FS_IOC_RESVSP: case...
@@ -590,6 +590,7 @@ static long ioctl_file_dedupe_range(struct file *file, void __user *arg) goto out; } + same->dest_count = count; ret = vfs_dedupe_file_range(file, same); if (ret) goto out;
CWE-119
null
null
40,538
int generic_block_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, u64 start, u64 len, get_block_t *get_block) { int ret; inode_lock(inode); ret = __generic_block_fiemap(inode, fieinfo, start, len, get_block); inode_unlock(inode); return ret; }
DoS Overflow +Priv
0
int generic_block_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, u64 start, u64 len, get_block_t *get_block) { int ret; inode_lock(inode); ret = __generic_block_fiemap(inode, fieinfo, start, len, get_block); inode_unlock(inode); return ret; }
@@ -590,6 +590,7 @@ static long ioctl_file_dedupe_range(struct file *file, void __user *arg) goto out; } + same->dest_count = count; ret = vfs_dedupe_file_range(file, same); if (ret) goto out;
CWE-119
null
null
40,539
static int ioctl_fibmap(struct file *filp, int __user *p) { struct address_space *mapping = filp->f_mapping; int res, block; /* do we support this mess? */ if (!mapping->a_ops->bmap) return -EINVAL; if (!capable(CAP_SYS_RAWIO)) return -EPERM; res = get_user(block, p); if (res) return res; res = mapping->...
DoS Overflow +Priv
0
static int ioctl_fibmap(struct file *filp, int __user *p) { struct address_space *mapping = filp->f_mapping; int res, block; /* do we support this mess? */ if (!mapping->a_ops->bmap) return -EINVAL; if (!capable(CAP_SYS_RAWIO)) return -EPERM; res = get_user(block, p); if (res) return res; res = mapping->...
@@ -590,6 +590,7 @@ static long ioctl_file_dedupe_range(struct file *file, void __user *arg) goto out; } + same->dest_count = count; ret = vfs_dedupe_file_range(file, same); if (ret) goto out;
CWE-119
null
null
40,540
static int ioctl_fiemap(struct file *filp, unsigned long arg) { struct fiemap fiemap; struct fiemap __user *ufiemap = (struct fiemap __user *) arg; struct fiemap_extent_info fieinfo = { 0, }; struct inode *inode = file_inode(filp); struct super_block *sb = inode->i_sb; u64 len; int error; if (!inode->i_op->fie...
DoS Overflow +Priv
0
static int ioctl_fiemap(struct file *filp, unsigned long arg) { struct fiemap fiemap; struct fiemap __user *ufiemap = (struct fiemap __user *) arg; struct fiemap_extent_info fieinfo = { 0, }; struct inode *inode = file_inode(filp); struct super_block *sb = inode->i_sb; u64 len; int error; if (!inode->i_op->fie...
@@ -590,6 +590,7 @@ static long ioctl_file_dedupe_range(struct file *file, void __user *arg) goto out; } + same->dest_count = count; ret = vfs_dedupe_file_range(file, same); if (ret) goto out;
CWE-119
null
null
40,541
static long ioctl_file_clone(struct file *dst_file, unsigned long srcfd, u64 off, u64 olen, u64 destoff) { struct fd src_file = fdget(srcfd); int ret; if (!src_file.file) return -EBADF; ret = vfs_clone_file_range(src_file.file, off, dst_file, destoff, olen); fdput(src_file); return ret; }
DoS Overflow +Priv
0
static long ioctl_file_clone(struct file *dst_file, unsigned long srcfd, u64 off, u64 olen, u64 destoff) { struct fd src_file = fdget(srcfd); int ret; if (!src_file.file) return -EBADF; ret = vfs_clone_file_range(src_file.file, off, dst_file, destoff, olen); fdput(src_file); return ret; }
@@ -590,6 +590,7 @@ static long ioctl_file_dedupe_range(struct file *file, void __user *arg) goto out; } + same->dest_count = count; ret = vfs_dedupe_file_range(file, same); if (ret) goto out;
CWE-119
null
null
40,542
static long ioctl_file_clone_range(struct file *file, void __user *argp) { struct file_clone_range args; if (copy_from_user(&args, argp, sizeof(args))) return -EFAULT; return ioctl_file_clone(file, args.src_fd, args.src_offset, args.src_length, args.dest_offset); }
DoS Overflow +Priv
0
static long ioctl_file_clone_range(struct file *file, void __user *argp) { struct file_clone_range args; if (copy_from_user(&args, argp, sizeof(args))) return -EFAULT; return ioctl_file_clone(file, args.src_fd, args.src_offset, args.src_length, args.dest_offset); }
@@ -590,6 +590,7 @@ static long ioctl_file_dedupe_range(struct file *file, void __user *arg) goto out; } + same->dest_count = count; ret = vfs_dedupe_file_range(file, same); if (ret) goto out;
CWE-119
null
null
40,543
static int ioctl_fionbio(struct file *filp, int __user *argp) { unsigned int flag; int on, error; error = get_user(on, argp); if (error) return error; flag = O_NONBLOCK; #ifdef __sparc__ /* SunOS compatibility item. */ if (O_NONBLOCK != O_NDELAY) flag |= O_NDELAY; #endif spin_lock(&filp->f_lock); if (on) ...
DoS Overflow +Priv
0
static int ioctl_fionbio(struct file *filp, int __user *argp) { unsigned int flag; int on, error; error = get_user(on, argp); if (error) return error; flag = O_NONBLOCK; #ifdef __sparc__ /* SunOS compatibility item. */ if (O_NONBLOCK != O_NDELAY) flag |= O_NDELAY; #endif spin_lock(&filp->f_lock); if (on) ...
@@ -590,6 +590,7 @@ static long ioctl_file_dedupe_range(struct file *file, void __user *arg) goto out; } + same->dest_count = count; ret = vfs_dedupe_file_range(file, same); if (ret) goto out;
CWE-119
null
null
40,544
static int ioctl_fsfreeze(struct file *filp) { struct super_block *sb = file_inode(filp)->i_sb; if (!capable(CAP_SYS_ADMIN)) return -EPERM; /* If filesystem doesn't support freeze feature, return. */ if (sb->s_op->freeze_fs == NULL && sb->s_op->freeze_super == NULL) return -EOPNOTSUPP; /* Freeze */ if (sb-...
DoS Overflow +Priv
0
static int ioctl_fsfreeze(struct file *filp) { struct super_block *sb = file_inode(filp)->i_sb; if (!capable(CAP_SYS_ADMIN)) return -EPERM; /* If filesystem doesn't support freeze feature, return. */ if (sb->s_op->freeze_fs == NULL && sb->s_op->freeze_super == NULL) return -EOPNOTSUPP; /* Freeze */ if (sb-...
@@ -590,6 +590,7 @@ static long ioctl_file_dedupe_range(struct file *file, void __user *arg) goto out; } + same->dest_count = count; ret = vfs_dedupe_file_range(file, same); if (ret) goto out;
CWE-119
null
null
40,545
static int ioctl_fsthaw(struct file *filp) { struct super_block *sb = file_inode(filp)->i_sb; if (!capable(CAP_SYS_ADMIN)) return -EPERM; /* Thaw */ if (sb->s_op->thaw_super) return sb->s_op->thaw_super(sb); return thaw_super(sb); }
DoS Overflow +Priv
0
static int ioctl_fsthaw(struct file *filp) { struct super_block *sb = file_inode(filp)->i_sb; if (!capable(CAP_SYS_ADMIN)) return -EPERM; /* Thaw */ if (sb->s_op->thaw_super) return sb->s_op->thaw_super(sb); return thaw_super(sb); }
@@ -590,6 +590,7 @@ static long ioctl_file_dedupe_range(struct file *file, void __user *arg) goto out; } + same->dest_count = count; ret = vfs_dedupe_file_range(file, same); if (ret) goto out;
CWE-119
null
null
40,546
int ioctl_preallocate(struct file *filp, void __user *argp) { struct inode *inode = file_inode(filp); struct space_resv sr; if (copy_from_user(&sr, argp, sizeof(sr))) return -EFAULT; switch (sr.l_whence) { case SEEK_SET: break; case SEEK_CUR: sr.l_start += filp->f_pos; break; case SEEK_END: sr.l_star...
DoS Overflow +Priv
0
int ioctl_preallocate(struct file *filp, void __user *argp) { struct inode *inode = file_inode(filp); struct space_resv sr; if (copy_from_user(&sr, argp, sizeof(sr))) return -EFAULT; switch (sr.l_whence) { case SEEK_SET: break; case SEEK_CUR: sr.l_start += filp->f_pos; break; case SEEK_END: sr.l_star...
@@ -590,6 +590,7 @@ static long ioctl_file_dedupe_range(struct file *file, void __user *arg) goto out; } + same->dest_count = count; ret = vfs_dedupe_file_range(file, same); if (ret) goto out;
CWE-119
null
null
40,547
disable_forwarding(void) { no_port_forwarding_flag = 1; no_agent_forwarding_flag = 1; no_x11_forwarding_flag = 1; }
DoS
0
disable_forwarding(void) { no_port_forwarding_flag = 1; no_agent_forwarding_flag = 1; no_x11_forwarding_flag = 1; }
@@ -1,4 +1,4 @@ -/* $OpenBSD: auth-passwd.c,v 1.44 2014/07/15 15:54:14 millert Exp $ */ +/* $OpenBSD: auth-passwd.c,v 1.45 2016/07/21 01:39:35 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -66,6 +66,8 @@ extern login_cap_t *lc; #defin...
CWE-20
null
null
40,548
sys_auth_passwd(Authctxt *authctxt, const char *password) { struct passwd *pw = authctxt->pw; auth_session_t *as; static int expire_checked = 0; as = auth_usercheck(pw->pw_name, authctxt->style, "auth-ssh", (char *)password); if (as == NULL) return (0); if (auth_getstate(as) & AUTH_PWEXPIRED) { auth_clo...
DoS
0
sys_auth_passwd(Authctxt *authctxt, const char *password) { struct passwd *pw = authctxt->pw; auth_session_t *as; static int expire_checked = 0; as = auth_usercheck(pw->pw_name, authctxt->style, "auth-ssh", (char *)password); if (as == NULL) return (0); if (auth_getstate(as) & AUTH_PWEXPIRED) { auth_clo...
@@ -1,4 +1,4 @@ -/* $OpenBSD: auth-passwd.c,v 1.44 2014/07/15 15:54:14 millert Exp $ */ +/* $OpenBSD: auth-passwd.c,v 1.45 2016/07/21 01:39:35 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -66,6 +66,8 @@ extern login_cap_t *lc; #defin...
CWE-20
null
null
40,549
warn_expiry(Authctxt *authctxt, auth_session_t *as) { char buf[256]; quad_t pwtimeleft, actimeleft, daysleft, pwwarntime, acwarntime; pwwarntime = acwarntime = TWO_WEEKS; pwtimeleft = auth_check_change(as); actimeleft = auth_check_expire(as); #ifdef HAVE_LOGIN_CAP if (authctxt->valid) { pwwarntime = login_get...
DoS
0
warn_expiry(Authctxt *authctxt, auth_session_t *as) { char buf[256]; quad_t pwtimeleft, actimeleft, daysleft, pwwarntime, acwarntime; pwwarntime = acwarntime = TWO_WEEKS; pwtimeleft = auth_check_change(as); actimeleft = auth_check_expire(as); #ifdef HAVE_LOGIN_CAP if (authctxt->valid) { pwwarntime = login_get...
@@ -1,4 +1,4 @@ -/* $OpenBSD: auth-passwd.c,v 1.44 2014/07/15 15:54:14 millert Exp $ */ +/* $OpenBSD: auth-passwd.c,v 1.45 2016/07/21 01:39:35 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -66,6 +66,8 @@ extern login_cap_t *lc; #defin...
CWE-20
null
null
40,550
MagickExport MagickBooleanType CloneImageProperties(Image *image, const Image *clone_image) { assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); assert(clone_image != (...
DoS Overflow
0
MagickExport MagickBooleanType CloneImageProperties(Image *image, const Image *clone_image) { assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); assert(clone_image != (...
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,551
MagickExport MagickBooleanType DeleteImageProperty(Image *image, const char *property) { assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (image->properties == (vo...
DoS Overflow
0
MagickExport MagickBooleanType DeleteImageProperty(Image *image, const char *property) { assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (image->properties == (vo...
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,552
MagickExport void DestroyImageProperties(Image *image) { assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (image->properties != (void *) NULL) image->properties=...
DoS Overflow
0
MagickExport void DestroyImageProperties(Image *image) { assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (image->properties != (void *) NULL) image->properties=...
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,553
MagickExport MagickBooleanType FormatImageProperty(Image *image, const char *property,const char *format,...) { char value[MagickPathExtent]; ExceptionInfo *exception; MagickBooleanType status; ssize_t n; va_list operands; va_start(operands,format); n=FormatLocaleStringList(valu...
DoS Overflow
0
MagickExport MagickBooleanType FormatImageProperty(Image *image, const char *property,const char *format,...) { char value[MagickPathExtent]; ExceptionInfo *exception; MagickBooleanType status; ssize_t n; va_list operands; va_start(operands,format); n=FormatLocaleStringList(valu...
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,554
static MagickBooleanType GetICCProperty(const Image *image,const char *property, ExceptionInfo *exception) { const StringInfo *profile; magick_unreferenced(property); profile=GetImageProfile(image,"icc"); if (profile == (StringInfo *) NULL) profile=GetImageProfile(image,"icm"); if (profile == (Str...
DoS Overflow
0
static MagickBooleanType GetICCProperty(const Image *image,const char *property, ExceptionInfo *exception) { const StringInfo *profile; magick_unreferenced(property); profile=GetImageProfile(image,"icc"); if (profile == (StringInfo *) NULL) profile=GetImageProfile(image,"icm"); if (profile == (Str...
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,555
static MagickBooleanType GetIPTCProperty(const Image *image,const char *key, ExceptionInfo *exception) { char *attribute, *message; const StringInfo *profile; long count, dataset, record; register ssize_t i; size_t length; profile=GetImageProfile(image,"iptc"); if (p...
DoS Overflow
0
static MagickBooleanType GetIPTCProperty(const Image *image,const char *key, ExceptionInfo *exception) { char *attribute, *message; const StringInfo *profile; long count, dataset, record; register ssize_t i; size_t length; profile=GetImageProfile(image,"iptc"); if (p...
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,556
MagickExport const char *GetMagickProperty(ImageInfo *image_info, Image *image,const char *property,ExceptionInfo *exception) { char value[MagickPathExtent]; const char *string; assert(property[0] != '\0'); assert(image != (Image *) NULL || image_info != (ImageInfo *) NULL ); if (property[1] == '\...
DoS Overflow
0
MagickExport const char *GetMagickProperty(ImageInfo *image_info, Image *image,const char *property,ExceptionInfo *exception) { char value[MagickPathExtent]; const char *string; assert(property[0] != '\0'); assert(image != (Image *) NULL || image_info != (ImageInfo *) NULL ); if (property[1] == '\...
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,557
static MagickBooleanType GetXMPProperty(const Image *image,const char *property) { char *xmp_profile; const char *content; const StringInfo *profile; ExceptionInfo *exception; MagickBooleanType status; register const char *p; XMLTreeInfo *child, *description, *nod...
DoS Overflow
0
static MagickBooleanType GetXMPProperty(const Image *image,const char *property) { char *xmp_profile; const char *content; const StringInfo *profile; ExceptionInfo *exception; MagickBooleanType status; register const char *p; XMLTreeInfo *child, *description, *nod...
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,558
MagickExport char *InterpretImageProperties(ImageInfo *image_info,Image *image, const char *embed_text,ExceptionInfo *exception) { #define ExtendInterpretText(string_length) \ DisableMSCWarning(4127) \ { \ size_t length=(string_length); \ if ((size_t) (q-interpret_text+length+1) >= extent) \ { \ extent+...
DoS Overflow
0
MagickExport char *InterpretImageProperties(ImageInfo *image_info,Image *image, const char *embed_text,ExceptionInfo *exception) { #define ExtendInterpretText(string_length) \ DisableMSCWarning(4127) \ { \ size_t length=(string_length); \ if ((size_t) (q-interpret_text+length+1) >= extent) \ { \ extent+...
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,559
static inline signed int ReadPropertyMSBLong(const unsigned char **p, size_t *length) { union { unsigned int unsigned_value; signed int signed_value; } quantum; int c; register ssize_t i; unsigned char buffer[4]; unsigned int value; if (*length < 4) return...
DoS Overflow
0
static inline signed int ReadPropertyMSBLong(const unsigned char **p, size_t *length) { union { unsigned int unsigned_value; signed int signed_value; } quantum; int c; register ssize_t i; unsigned char buffer[4]; unsigned int value; if (*length < 4) return...
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,560
static inline signed short ReadPropertyMSBShort(const unsigned char **p, size_t *length) { union { unsigned short unsigned_value; signed short signed_value; } quantum; int c; register ssize_t i; unsigned char buffer[2]; unsigned short value; if (*length < 2) ...
DoS Overflow
0
static inline signed short ReadPropertyMSBShort(const unsigned char **p, size_t *length) { union { unsigned short unsigned_value; signed short signed_value; } quantum; int c; register ssize_t i; unsigned char buffer[2]; unsigned short value; if (*length < 2) ...
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,561
static inline signed int ReadPropertySignedLong(const EndianType endian, const unsigned char *buffer) { union { unsigned int unsigned_value; signed int signed_value; } quantum; unsigned int value; if (endian == LSBEndian) { value=(unsigned int) buffer[3] << 24; val...
DoS Overflow
0
static inline signed int ReadPropertySignedLong(const EndianType endian, const unsigned char *buffer) { union { unsigned int unsigned_value; signed int signed_value; } quantum; unsigned int value; if (endian == LSBEndian) { value=(unsigned int) buffer[3] << 24; val...
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,562
static inline signed short ReadPropertySignedShort(const EndianType endian, const unsigned char *buffer) { union { unsigned short unsigned_value; signed short signed_value; } quantum; unsigned short value; if (endian == LSBEndian) { value=(unsigned short) buffer[1] << 8;...
DoS Overflow
0
static inline signed short ReadPropertySignedShort(const EndianType endian, const unsigned char *buffer) { union { unsigned short unsigned_value; signed short signed_value; } quantum; unsigned short value; if (endian == LSBEndian) { value=(unsigned short) buffer[1] << 8;...
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,563
static inline unsigned int ReadPropertyUnsignedLong(const EndianType endian, const unsigned char *buffer) { unsigned int value; if (endian == LSBEndian) { value=(unsigned int) buffer[3] << 24; value|=(unsigned int) buffer[2] << 16; value|=(unsigned int) buffer[1] << 8; value|=(uns...
DoS Overflow
0
static inline unsigned int ReadPropertyUnsignedLong(const EndianType endian, const unsigned char *buffer) { unsigned int value; if (endian == LSBEndian) { value=(unsigned int) buffer[3] << 24; value|=(unsigned int) buffer[2] << 16; value|=(unsigned int) buffer[1] << 8; value|=(uns...
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,564
static inline unsigned short ReadPropertyUnsignedShort(const EndianType endian, const unsigned char *buffer) { unsigned short value; if (endian == LSBEndian) { value=(unsigned short) buffer[1] << 8; value|=(unsigned short) buffer[0]; return(value & 0xffff); } value=(unsigned short...
DoS Overflow
0
static inline unsigned short ReadPropertyUnsignedShort(const EndianType endian, const unsigned char *buffer) { unsigned short value; if (endian == LSBEndian) { value=(unsigned short) buffer[1] << 8; value|=(unsigned short) buffer[0]; return(value & 0xffff); } value=(unsigned short...
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,565
MagickExport MagickBooleanType SetImageProperty(Image *image, const char *property,const char *value,ExceptionInfo *exception) { MagickBooleanType status; MagickStatusType flags; assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) ...
DoS Overflow
0
MagickExport MagickBooleanType SetImageProperty(Image *image, const char *property,const char *value,ExceptionInfo *exception) { MagickBooleanType status; MagickStatusType flags; assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) ...
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,566
static MagickBooleanType SkipXMPValue(const char *value) { if (value == (const char*) NULL) return(MagickTrue); while (*value != '\0') { if (isspace((int) ((unsigned char) *value)) == 0) return(MagickFalse); value++; } return(MagickTrue); }
DoS Overflow
0
static MagickBooleanType SkipXMPValue(const char *value) { if (value == (const char*) NULL) return(MagickTrue); while (*value != '\0') { if (isspace((int) ((unsigned char) *value)) == 0) return(MagickFalse); value++; } return(MagickTrue); }
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,567
static char *TraceSVGClippath(const unsigned char *blob,size_t length, const size_t columns,const size_t rows) { char *path, *message; MagickBooleanType in_subpath; PointInfo first[3], last[3], point[3]; register ssize_t i; ssize_t knot_count, selector, x, y; ...
DoS Overflow
0
static char *TraceSVGClippath(const unsigned char *blob,size_t length, const size_t columns,const size_t rows) { char *path, *message; MagickBooleanType in_subpath; PointInfo first[3], last[3], point[3]; register ssize_t i; ssize_t knot_count, selector, x, y; ...
@@ -665,6 +665,11 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, if ((count & 0x01) == 0) (void) ReadPropertyByte(&info,&length); count=(ssize_t) ReadPropertyMSBLong(&info,&length); + if ((count < 0) || ((size_t) count > length)) + { + length=0; + ...
CWE-125
null
null
40,568
static struct srpt_port *__srpt_lookup_port(const char *name) { struct ib_device *dev; struct srpt_device *sdev; struct srpt_port *sport; int i; list_for_each_entry(sdev, &srpt_dev_list, list) { dev = sdev->device; if (!dev) continue; for (i = 0; i < dev->phys_port_cnt; i++) { sport = &sdev->port[i];...
DoS
0
static struct srpt_port *__srpt_lookup_port(const char *name) { struct ib_device *dev; struct srpt_device *sdev; struct srpt_port *sport; int i; list_for_each_entry(sdev, &srpt_dev_list, list) { dev = sdev->device; if (!dev) continue; for (i = 0; i < dev->phys_port_cnt; i++) { sport = &sdev->port[i];...
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,569
enum dma_data_direction opposite_dma_dir(enum dma_data_direction dir) { switch (dir) { case DMA_TO_DEVICE: return DMA_FROM_DEVICE; case DMA_FROM_DEVICE: return DMA_TO_DEVICE; default: return dir; } }
DoS
0
enum dma_data_direction opposite_dma_dir(enum dma_data_direction dir) { switch (dir) { case DMA_TO_DEVICE: return DMA_FROM_DEVICE; case DMA_FROM_DEVICE: return DMA_TO_DEVICE; default: return dir; } }
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,570
static int srp_tmr_to_tcm(int fn) { switch (fn) { case SRP_TSK_ABORT_TASK: return TMR_ABORT_TASK; case SRP_TSK_ABORT_TASK_SET: return TMR_ABORT_TASK_SET; case SRP_TSK_CLEAR_TASK_SET: return TMR_CLEAR_TASK_SET; case SRP_TSK_LUN_RESET: return TMR_LUN_RESET; case SRP_TSK_CLEAR_ACA: return TMR_CLEAR_ACA;...
DoS
0
static int srp_tmr_to_tcm(int fn) { switch (fn) { case SRP_TSK_ABORT_TASK: return TMR_ABORT_TASK; case SRP_TSK_ABORT_TASK_SET: return TMR_ABORT_TASK_SET; case SRP_TSK_CLEAR_TASK_SET: return TMR_CLEAR_TASK_SET; case SRP_TSK_LUN_RESET: return TMR_LUN_RESET; case SRP_TSK_CLEAR_ACA: return TMR_CLEAR_ACA;...
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,571
static int srpt_abort_cmd(struct srpt_send_ioctx *ioctx) { enum srpt_command_state state; unsigned long flags; BUG_ON(!ioctx); /* * If the command is in a state where the target core is waiting for * the ib_srpt driver, change the state to the next state. Changing * the state of the command from SRPT_STATE_...
DoS
0
static int srpt_abort_cmd(struct srpt_send_ioctx *ioctx) { enum srpt_command_state state; unsigned long flags; BUG_ON(!ioctx); /* * If the command is in a state where the target core is waiting for * the ib_srpt driver, change the state to the next state. Changing * the state of the command from SRPT_STATE_...
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,572
static void srpt_aborted_task(struct se_cmd *cmd) { struct srpt_send_ioctx *ioctx = container_of(cmd, struct srpt_send_ioctx, cmd); srpt_unmap_sg_to_ib_sge(ioctx->ch, ioctx); }
DoS
0
static void srpt_aborted_task(struct se_cmd *cmd) { struct srpt_send_ioctx *ioctx = container_of(cmd, struct srpt_send_ioctx, cmd); srpt_unmap_sg_to_ib_sge(ioctx->ch, ioctx); }
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,573
static void srpt_add_one(struct ib_device *device) { struct srpt_device *sdev; struct srpt_port *sport; struct ib_srq_init_attr srq_attr; int i; pr_debug("device = %p, device->dma_ops = %p\n", device, device->dma_ops); sdev = kzalloc(sizeof *sdev, GFP_KERNEL); if (!sdev) goto err; sdev->device = device;...
DoS
0
static void srpt_add_one(struct ib_device *device) { struct srpt_device *sdev; struct srpt_port *sport; struct ib_srq_init_attr srq_attr; int i; pr_debug("device = %p, device->dma_ops = %p\n", device, device->dma_ops); sdev = kzalloc(sizeof *sdev, GFP_KERNEL); if (!sdev) goto err; sdev->device = device;...
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,574
static struct srpt_ioctx **srpt_alloc_ioctx_ring(struct srpt_device *sdev, int ring_size, int ioctx_size, int dma_size, enum dma_data_direction dir) { struct srpt_ioctx **ring; int i; WARN_ON(ioctx_size != sizeof(struct srpt_recv_ioctx) && ioctx_size != sizeof(struct srpt_send_ioctx)); ring = kmalloc(ri...
DoS
0
static struct srpt_ioctx **srpt_alloc_ioctx_ring(struct srpt_device *sdev, int ring_size, int ioctx_size, int dma_size, enum dma_data_direction dir) { struct srpt_ioctx **ring; int i; WARN_ON(ioctx_size != sizeof(struct srpt_recv_ioctx) && ioctx_size != sizeof(struct srpt_send_ioctx)); ring = kmalloc(ri...
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,575
static int srpt_build_cmd_rsp(struct srpt_rdma_ch *ch, struct srpt_send_ioctx *ioctx, u64 tag, int status) { struct srp_rsp *srp_rsp; const u8 *sense_data; int sense_data_len, max_sense_len; /* * The lowest bit of all SAM-3 status codes is zero (see also * paragraph 5.3 in SAM-3). */ WARN_...
DoS
0
static int srpt_build_cmd_rsp(struct srpt_rdma_ch *ch, struct srpt_send_ioctx *ioctx, u64 tag, int status) { struct srp_rsp *srp_rsp; const u8 *sense_data; int sense_data_len, max_sense_len; /* * The lowest bit of all SAM-3 status codes is zero (see also * paragraph 5.3 in SAM-3). */ WARN_...
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,576
static int srpt_build_tskmgmt_rsp(struct srpt_rdma_ch *ch, struct srpt_send_ioctx *ioctx, u8 rsp_code, u64 tag) { struct srp_rsp *srp_rsp; int resp_data_len; int resp_len; resp_data_len = 4; resp_len = sizeof(*srp_rsp) + resp_data_len; srp_rsp = ioctx->ioctx.buf; BUG_ON(!srp_rsp); memset(srp_rsp, ...
DoS
0
static int srpt_build_tskmgmt_rsp(struct srpt_rdma_ch *ch, struct srpt_send_ioctx *ioctx, u8 rsp_code, u64 tag) { struct srp_rsp *srp_rsp; int resp_data_len; int resp_len; resp_data_len = 4; resp_len = sizeof(*srp_rsp) + resp_data_len; srp_rsp = ioctx->ioctx.buf; BUG_ON(!srp_rsp); memset(srp_rsp, ...
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,577
static int srpt_ch_list_empty(struct srpt_device *sdev) { int res; spin_lock_irq(&sdev->spinlock); res = list_empty(&sdev->rch_list); spin_unlock_irq(&sdev->spinlock); return res; }
DoS
0
static int srpt_ch_list_empty(struct srpt_device *sdev) { int res; spin_lock_irq(&sdev->spinlock); res = list_empty(&sdev->rch_list); spin_unlock_irq(&sdev->spinlock); return res; }
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,578
static int srpt_ch_qp_rtr(struct srpt_rdma_ch *ch, struct ib_qp *qp) { struct ib_qp_attr qp_attr; int attr_mask; int ret; qp_attr.qp_state = IB_QPS_RTR; ret = ib_cm_init_qp_attr(ch->cm_id, &qp_attr, &attr_mask); if (ret) goto out; qp_attr.max_dest_rd_atomic = 4; ret = ib_modify_qp(qp, &qp_attr, attr_mask);...
DoS
0
static int srpt_ch_qp_rtr(struct srpt_rdma_ch *ch, struct ib_qp *qp) { struct ib_qp_attr qp_attr; int attr_mask; int ret; qp_attr.qp_state = IB_QPS_RTR; ret = ib_cm_init_qp_attr(ch->cm_id, &qp_attr, &attr_mask); if (ret) goto out; qp_attr.max_dest_rd_atomic = 4; ret = ib_modify_qp(qp, &qp_attr, attr_mask);...
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,579
static int srpt_check_false(struct se_portal_group *se_tpg) { return 0; }
DoS
0
static int srpt_check_false(struct se_portal_group *se_tpg) { return 0; }
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,580
static int srpt_check_stop_free(struct se_cmd *cmd) { struct srpt_send_ioctx *ioctx = container_of(cmd, struct srpt_send_ioctx, cmd); return target_put_sess_cmd(&ioctx->cmd); }
DoS
0
static int srpt_check_stop_free(struct se_cmd *cmd) { struct srpt_send_ioctx *ioctx = container_of(cmd, struct srpt_send_ioctx, cmd); return target_put_sess_cmd(&ioctx->cmd); }
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,581
static int srpt_check_true(struct se_portal_group *se_tpg) { return 1; }
DoS
0
static int srpt_check_true(struct se_portal_group *se_tpg) { return 1; }
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,582
static void __exit srpt_cleanup_module(void) { ib_unregister_client(&srpt_client); target_unregister_template(&srpt_template); }
DoS
0
static void __exit srpt_cleanup_module(void) { ib_unregister_client(&srpt_client); target_unregister_template(&srpt_template); }
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,583
static void srpt_close_ch(struct srpt_rdma_ch *ch) { struct srpt_device *sdev; sdev = ch->sport->sdev; spin_lock_irq(&sdev->spinlock); __srpt_close_ch(ch); spin_unlock_irq(&sdev->spinlock); }
DoS
0
static void srpt_close_ch(struct srpt_rdma_ch *ch) { struct srpt_device *sdev; sdev = ch->sport->sdev; spin_lock_irq(&sdev->spinlock); __srpt_close_ch(ch); spin_unlock_irq(&sdev->spinlock); }
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,584
static void srpt_close_session(struct se_session *se_sess) { DECLARE_COMPLETION_ONSTACK(release_done); struct srpt_rdma_ch *ch; struct srpt_device *sdev; unsigned long res; ch = se_sess->fabric_sess_ptr; WARN_ON(ch->sess != se_sess); pr_debug("ch %p state %d\n", ch, srpt_get_ch_state(ch)); sdev = ch->sport->...
DoS
0
static void srpt_close_session(struct se_session *se_sess) { DECLARE_COMPLETION_ONSTACK(release_done); struct srpt_rdma_ch *ch; struct srpt_device *sdev; unsigned long res; ch = se_sess->fabric_sess_ptr; WARN_ON(ch->sess != se_sess); pr_debug("ch %p state %d\n", ch, srpt_get_ch_state(ch)); sdev = ch->sport->...
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,585
static void srpt_cm_dreq_recv(struct ib_cm_id *cm_id) { struct srpt_rdma_ch *ch; unsigned long flags; bool send_drep = false; ch = srpt_find_channel(cm_id->context, cm_id); BUG_ON(!ch); pr_debug("cm_id= %p ch->state= %d\n", cm_id, srpt_get_ch_state(ch)); spin_lock_irqsave(&ch->spinlock, flags); switch (ch->s...
DoS
0
static void srpt_cm_dreq_recv(struct ib_cm_id *cm_id) { struct srpt_rdma_ch *ch; unsigned long flags; bool send_drep = false; ch = srpt_find_channel(cm_id->context, cm_id); BUG_ON(!ch); pr_debug("cm_id= %p ch->state= %d\n", cm_id, srpt_get_ch_state(ch)); spin_lock_irqsave(&ch->spinlock, flags); switch (ch->s...
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,586
static int srpt_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event) { int ret; ret = 0; switch (event->event) { case IB_CM_REQ_RECEIVED: ret = srpt_cm_req_recv(cm_id, &event->param.req_rcvd, event->private_data); break; case IB_CM_REJ_RECEIVED: srpt_cm_rej_recv(cm_id); break; case IB...
DoS
0
static int srpt_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event) { int ret; ret = 0; switch (event->event) { case IB_CM_REQ_RECEIVED: ret = srpt_cm_req_recv(cm_id, &event->param.req_rcvd, event->private_data); break; case IB_CM_REJ_RECEIVED: srpt_cm_rej_recv(cm_id); break; case IB...
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,587
static void srpt_cm_rej_recv(struct ib_cm_id *cm_id) { pr_info("Received IB REJ for cm_id %p.\n", cm_id); srpt_drain_channel(cm_id); }
DoS
0
static void srpt_cm_rej_recv(struct ib_cm_id *cm_id) { pr_info("Received IB REJ for cm_id %p.\n", cm_id); srpt_drain_channel(cm_id); }
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,588
static void srpt_cm_rep_error(struct ib_cm_id *cm_id) { pr_info("Received IB REP error for cm_id %p.\n", cm_id); srpt_drain_channel(cm_id); }
DoS
0
static void srpt_cm_rep_error(struct ib_cm_id *cm_id) { pr_info("Received IB REP error for cm_id %p.\n", cm_id); srpt_drain_channel(cm_id); }
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,589
static int srpt_cm_req_recv(struct ib_cm_id *cm_id, struct ib_cm_req_event_param *param, void *private_data) { struct srpt_device *sdev = cm_id->context; struct srpt_port *sport = &sdev->port[param->port - 1]; struct srp_login_req *req; struct srp_login_rsp *rsp; struct srp_login_rej *rej; struct ib...
DoS
0
static int srpt_cm_req_recv(struct ib_cm_id *cm_id, struct ib_cm_req_event_param *param, void *private_data) { struct srpt_device *sdev = cm_id->context; struct srpt_port *sport = &sdev->port[param->port - 1]; struct srp_login_req *req; struct srp_login_rsp *rsp; struct srp_login_rej *rej; struct ib...
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,590
static void srpt_cm_rtu_recv(struct ib_cm_id *cm_id) { struct srpt_rdma_ch *ch; int ret; ch = srpt_find_channel(cm_id->context, cm_id); BUG_ON(!ch); if (srpt_test_and_set_ch_state(ch, CH_CONNECTING, CH_LIVE)) { struct srpt_recv_ioctx *ioctx, *ioctx_tmp; ret = srpt_ch_qp_rts(ch, ch->qp); list_for_each_ent...
DoS
0
static void srpt_cm_rtu_recv(struct ib_cm_id *cm_id) { struct srpt_rdma_ch *ch; int ret; ch = srpt_find_channel(cm_id->context, cm_id); BUG_ON(!ch); if (srpt_test_and_set_ch_state(ch, CH_CONNECTING, CH_LIVE)) { struct srpt_recv_ioctx *ioctx, *ioctx_tmp; ret = srpt_ch_qp_rts(ch, ch->qp); list_for_each_ent...
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,591
static void srpt_cm_timewait_exit(struct ib_cm_id *cm_id) { pr_info("Received IB TimeWait exit for cm_id %p.\n", cm_id); srpt_drain_channel(cm_id); }
DoS
0
static void srpt_cm_timewait_exit(struct ib_cm_id *cm_id) { pr_info("Received IB TimeWait exit for cm_id %p.\n", cm_id); srpt_drain_channel(cm_id); }
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,592
static int srpt_create_ch_ib(struct srpt_rdma_ch *ch) { struct ib_qp_init_attr *qp_init; struct srpt_port *sport = ch->sport; struct srpt_device *sdev = sport->sdev; u32 srp_sq_size = sport->port_attrib.srp_sq_size; int ret; WARN_ON(ch->rq_size < 1); ret = -ENOMEM; qp_init = kzalloc(sizeof *qp_init, GFP_KERNE...
DoS
0
static int srpt_create_ch_ib(struct srpt_rdma_ch *ch) { struct ib_qp_init_attr *qp_init; struct srpt_port *sport = ch->sport; struct srpt_device *sdev = sport->sdev; u32 srp_sq_size = sport->port_attrib.srp_sq_size; int ret; WARN_ON(ch->rq_size < 1); ret = -ENOMEM; qp_init = kzalloc(sizeof *qp_init, GFP_KERNE...
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,593
static void srpt_destroy_ch_ib(struct srpt_rdma_ch *ch) { ib_destroy_qp(ch->qp); ib_free_cq(ch->cq); }
DoS
0
static void srpt_destroy_ch_ib(struct srpt_rdma_ch *ch) { ib_destroy_qp(ch->qp); ib_free_cq(ch->cq); }
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,594
static void srpt_drain_channel(struct ib_cm_id *cm_id) { struct srpt_device *sdev; struct srpt_rdma_ch *ch; int ret; bool do_reset = false; WARN_ON_ONCE(irqs_disabled()); sdev = cm_id->context; BUG_ON(!sdev); spin_lock_irq(&sdev->spinlock); list_for_each_entry(ch, &sdev->rch_list, list) { if (ch->cm_id == ...
DoS
0
static void srpt_drain_channel(struct ib_cm_id *cm_id) { struct srpt_device *sdev; struct srpt_rdma_ch *ch; int ret; bool do_reset = false; WARN_ON_ONCE(irqs_disabled()); sdev = cm_id->context; BUG_ON(!sdev); spin_lock_irq(&sdev->spinlock); list_for_each_entry(ch, &sdev->rch_list, list) { if (ch->cm_id == ...
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,595
static void srpt_drop_tpg(struct se_portal_group *tpg) { struct srpt_port *sport = container_of(tpg, struct srpt_port, port_tpg_1); sport->enabled = false; core_tpg_deregister(&sport->port_tpg_1); }
DoS
0
static void srpt_drop_tpg(struct se_portal_group *tpg) { struct srpt_port *sport = container_of(tpg, struct srpt_port, port_tpg_1); sport->enabled = false; core_tpg_deregister(&sport->port_tpg_1); }
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,596
static void srpt_event_handler(struct ib_event_handler *handler, struct ib_event *event) { struct srpt_device *sdev; struct srpt_port *sport; sdev = ib_get_client_data(event->device, &srpt_client); if (!sdev || sdev->device != event->device) return; pr_debug("ASYNC event= %d on device= %s\n", event->...
DoS
0
static void srpt_event_handler(struct ib_event_handler *handler, struct ib_event *event) { struct srpt_device *sdev; struct srpt_port *sport; sdev = ib_get_client_data(event->device, &srpt_client); if (!sdev || sdev->device != event->device) return; pr_debug("ASYNC event= %d on device= %s\n", event->...
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,597
static struct srpt_rdma_ch *srpt_find_channel(struct srpt_device *sdev, struct ib_cm_id *cm_id) { struct srpt_rdma_ch *ch; bool found; WARN_ON_ONCE(irqs_disabled()); BUG_ON(!sdev); found = false; spin_lock_irq(&sdev->spinlock); list_for_each_entry(ch, &sdev->rch_list, list) { if (ch->cm_id == cm_i...
DoS
0
static struct srpt_rdma_ch *srpt_find_channel(struct srpt_device *sdev, struct ib_cm_id *cm_id) { struct srpt_rdma_ch *ch; bool found; WARN_ON_ONCE(irqs_disabled()); BUG_ON(!sdev); found = false; spin_lock_irq(&sdev->spinlock); list_for_each_entry(ch, &sdev->rch_list, list) { if (ch->cm_id == cm_i...
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,598
static void srpt_free_ioctx(struct srpt_device *sdev, struct srpt_ioctx *ioctx, int dma_size, enum dma_data_direction dir) { if (!ioctx) return; ib_dma_unmap_single(sdev->device, ioctx->dma, dma_size, dir); kfree(ioctx->buf); kfree(ioctx); }
DoS
0
static void srpt_free_ioctx(struct srpt_device *sdev, struct srpt_ioctx *ioctx, int dma_size, enum dma_data_direction dir) { if (!ioctx) return; ib_dma_unmap_single(sdev->device, ioctx->dma, dma_size, dir); kfree(ioctx->buf); kfree(ioctx); }
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null
40,599
static void srpt_free_ioctx_ring(struct srpt_ioctx **ioctx_ring, struct srpt_device *sdev, int ring_size, int dma_size, enum dma_data_direction dir) { int i; for (i = 0; i < ring_size; ++i) srpt_free_ioctx(sdev, ioctx_ring[i], dma_size, dir); kfree(ioctx_ring); }
DoS
0
static void srpt_free_ioctx_ring(struct srpt_ioctx **ioctx_ring, struct srpt_device *sdev, int ring_size, int dma_size, enum dma_data_direction dir) { int i; for (i = 0; i < ring_size; ++i) srpt_free_ioctx(sdev, ioctx_ring[i], dma_size, dir); kfree(ioctx_ring); }
@@ -1670,47 +1670,6 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, return -1; } -/** - * srpt_rx_mgmt_fn_tag() - Process a task management function by tag. - * @ch: RDMA channel of the task management request. - * @fn: Task management function to perform. - * @req_tag: Tag of the SRP task management reques...
CWE-476
null
null